Need Help with phy
3 posters
Need Help with phy
i have number of phy objects which are on ground & i have another special phy obj which i want to move using touchmove even i want the gravity to be persent for all the phy obj appart from this special phy obj which i will b moving on touchmove event i want this obj to b fix at a particular & move only in my y-z plane & this special obj will forcefully move the rest of the phy objects in the direction in which the finger is moving.
till now i have manage to do most of the things but im not able to fix the height of my special obj it falls down to the ground.
can anyone help me out with this.... thanks
till now i have manage to do most of the things but im not able to fix the height of my special obj it falls down to the ground.
can anyone help me out with this.... thanks
abhi- Posts : 3
Join date : 2008-10-21
Re: Need Help with phy
As soon as the physic is ON, no SIO2 API or OpenGL API can help you to move the object around, you have to use the Bullet API to control your object motion in 3D space... I suggestion you take a look at the following functions:
_SIO2object->_btRigidBody->setLinearVelocity
_SIO2object->_btRigidBody->setAngularVelocity
etc...
Checkout the Bulllet SDK for more information...
Hope this help!
Cheers,
_SIO2object->_btRigidBody->setLinearVelocity
_SIO2object->_btRigidBody->setAngularVelocity
etc...
Checkout the Bulllet SDK for more information...
Hope this help!
Cheers,
Re: Need Help with phy
Is there a way to point the camera target at a dynamic moving object?
What would be the best way to move the position or the target of the camera during a simulation. I would like my camera to track the movement of my dynamic object which moves in a forward arc like movement.
What kind of control do I ultimately have over the dynamic positioning and target of my camera during the simulation?
I would guess any code would have to come inside of the render loop...
What would be the best way to move the position or the target of the camera during a simulation. I would like my camera to track the movement of my dynamic object which moves in a forward arc like movement.
What kind of control do I ultimately have over the dynamic positioning and target of my camera during the simulation?
I would guess any code would have to come inside of the render loop...
jj- Posts : 77
Join date : 2008-09-24
Re: Need Help with phy
Take a look at tutorial09, the camera is following the cylinder as it move throughout the 3D environment and also include collision, you can control the camera by the touch or by the accelerometer.
Re: Need Help with phy
sio2interactive wrote:Take a look at tutorial09, the camera is following the cylinder as it move throughout the 3D environment and also include collision, you can control the camera by the touch or by the accelerometer.
Is there an equivalent to sio2ObjectBindMatrix in the older version 1.1?
RESOLVED: I got it by simply copying and pasting the function to my existing 1.1 object.h/m
Last edited by jj on Tue Oct 28, 2008 3:09 am; edited 2 times in total
jj- Posts : 77
Join date : 2008-09-24
Re: Need Help with phy
sio2ObjectGetMatrix I think... but you should REALLY upgrade man... alot of work have been done since then... moving from 1.1 to 1.2.1 is not a big deal...
Re: Need Help with phy
I will be updating...
QUESTION: At first run my camera is at an undesired 90 degree angle on my object. I'm using the suggestions in tutorial 09. I;d like to initally set the direction and position of the camera. Where is best?
I'm not familiar with the sio2Orbit
QUESTION: At first run my camera is at an undesired 90 degree angle on my object. I'm using the suggestions in tutorial 09. I;d like to initally set the direction and position of the camera. Where is best?
I'm not familiar with the sio2Orbit
jj- Posts : 77
Join date : 2008-09-24
Re: Need Help with phy
Humm you can use Blender to position your camera (select camera then CTRL + F, and WASD to control), or you can set it manually...
_SIO2camera->pos->x = 0.0f;
_SIO2camera->pos->y = -15.0f;
_SIO2camera->pos->z = 5.0f;
_SIO2camera->tar->x = 0.0f;
_SIO2camera->tar->y = -14.0f;
_SIO2camera->tar->z = 5.0f;
sio2CameraUpdateDir( _SIO2camera );
Something like that...
_SIO2camera->pos->x = 0.0f;
_SIO2camera->pos->y = -15.0f;
_SIO2camera->pos->z = 5.0f;
_SIO2camera->tar->x = 0.0f;
_SIO2camera->tar->y = -14.0f;
_SIO2camera->tar->z = 5.0f;
sio2CameraUpdateDir( _SIO2camera );
Something like that...
Permissions in this forum:
You cannot reply to topics in this forum