FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Need Help with phy

3 posters

Go down

Need Help with phy Empty Need Help with phy

Post  abhi Sun Oct 26, 2008 11:59 pm

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

abhi

Posts : 3
Join date : 2008-10-21

Back to top Go down

Need Help with phy Empty Re: Need Help with phy

Post  sio2interactive Mon Oct 27, 2008 12:56 am

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,
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Need Help with phy Empty Re: Need Help with phy

Post  jj Tue Oct 28, 2008 2:24 am

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...

jj

Posts : 77
Join date : 2008-09-24

Back to top Go down

Need Help with phy Empty Re: Need Help with phy

Post  sio2interactive Tue Oct 28, 2008 2:33 am

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.
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Need Help with phy Empty Re: Need Help with phy

Post  jj Tue Oct 28, 2008 2:46 am

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

Back to top Go down

Need Help with phy Empty Re: Need Help with phy

Post  sio2interactive Tue Oct 28, 2008 2:52 am

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...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Need Help with phy Empty Re: Need Help with phy

Post  jj Tue Oct 28, 2008 3:10 am

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

jj

Posts : 77
Join date : 2008-09-24

Back to top Go down

Need Help with phy Empty Re: Need Help with phy

Post  sio2interactive Tue Oct 28, 2008 3:24 am

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...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Need Help with phy Empty Re: Need Help with phy

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum