How to get Transform from Physic Object?

View previous topic View next topic Go down

How to get Transform from Physic Object?

Post  clv on Wed Mar 04, 2009 6:02 pm

How can i get the transformation from the Physics (RigidBody) from an Object?

clv

Posts : 6
Join date : 2009-02-01

View user profile

Back to top Go down

Re: How to get Transform from Physic Object?

Post  sio2interactive on Wed Mar 04, 2009 6:17 pm

Bullet is controlling the object, the rigid body matrix is directly affected to the object:

_SIO2object->_SIO2transform->mat

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: How to get Transform from Physic Object?

Post  clv on Thu Mar 05, 2009 6:21 am

Sorry, how can i get the rotation from the matrix? I saw that the rot is not updated by the physics.

clv

Posts : 6
Join date : 2009-02-01

View user profile

Back to top Go down

Re: How to get Transform from Physic Object?

Post  sio2interactive on Thu Mar 05, 2009 6:40 am

Getting the rotation from the matrix while bullet is running Is obsolete... You'd be better controling your rigid body with linear and angular velocity and extract the rotation from the linear or angular direction vector.


Last edited by sio2interactive on Sun Apr 26, 2009 4:17 pm; edited 1 time in total

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: How to get Transform from Physic Object?

Post  clv on Thu Mar 05, 2009 7:25 pm

The problem is that i dont want to control, i want to verify if the object has a rotation on Y axis greater that 45 degrees, for example.
How could i do that?

clv

Posts : 6
Join date : 2009-02-01

View user profile

Back to top Go down

Re: How to get Transform from Physic Object?

Post  _-MADMAN-_ on Sun Apr 26, 2009 4:10 pm

Getting the rotation from the matrix while bullet is it Is obsolete... You'd be better controling your rigid body with linear and angular velocity and extract the rotation from the linear or angular direction vector.

Sorry for offtopic - how can I extract the rotation from linear/angular vector? Newbie question, I now Smile

_-MADMAN-_

Posts : 52
Join date : 2009-04-23

View user profile

Back to top Go down

Re: How to get Transform from Physic Object?

Post  sio2interactive on Sun Apr 26, 2009 4:18 pm

can you please re-formulate your question...

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: How to get Transform from Physic Object?

Post  _-MADMAN-_ on Sun Apr 26, 2009 5:32 pm

If We push object in sio (tutorial 9) we get direction for linear velocity from sio2->_SIO2camera...dir->x and dir->y; I want to get push direction from angular velocity of my object - otherwise push object by local axis (maybe this is the only problem?). Hope that this is more clear Smile

_-MADMAN-_

Posts : 52
Join date : 2009-04-23

View user profile

Back to top Go down

Re: How to get Transform from Physic Object?

Post  sio2interactive on Sun Apr 26, 2009 5:49 pm

in tutorial09 the object is dynamic not a rigid body, there's no rolling physic applied... I think you should really check the Bullet SDK...

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: How to get Transform from Physic Object?

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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