_SIO2objectphysic->_btRigidBody
3 posters
_SIO2objectphysic->_btRigidBody
Hi,
I'm a newby iphone developer from Spain (and I'm sorry about my bad english
I've created a Rigid Body sphere (named SphereObject) in blender, but when I want to acces by code...
...I can get to sio2Debug("1") and to sio2Debug("2") but I can't get to sio2Debug("3") The member _btRigidBody on _SIO2SphereObject->_SIO2objectphysic->_btRigidBody seems to be null.
How can I get the _btRigidBody loaded?
Thank you very, very much!!!!!
I'm a newby iphone developer from Spain (and I'm sorry about my bad english
I've created a Rigid Body sphere (named SphereObject) in blender, but when I want to acces by code...
- Code:
SIO2object *_SIO2SphereObject = ( SIO2object * )sio2ResourceGet( sio2->_SIO2resource, SIO2_OBJECT, "object/SphereObject" );
if(_SIO2SphereObject)
{
sio2Debug("1");
if( _SIO2SphereObject->_SIO2objectphysic)
{
sio2Debug("2");
if (_SIO2SphereObject->_SIO2objectphysic->_btRigidBody )
{
sio2Debug("3");
_SIO2SphereObject->_SIO2objectphysic->_btRigidBody->setLinearVelocity( btVector3( 10,0,0));
}
}
}
...I can get to sio2Debug("1") and to sio2Debug("2") but I can't get to sio2Debug("3") The member _btRigidBody on _SIO2SphereObject->_SIO2objectphysic->_btRigidBody seems to be null.
How can I get the _btRigidBody loaded?
Thank you very, very much!!!!!
manuelmartinf- Posts : 14
Join date : 2009-09-13
Re: _SIO2objectphysic->_btRigidBody
you must activate is state
_SIO2SphereObject->_SIO2objectphysic->_btRigidBody->setActivationState( ACTIVE_TAG );
check out tutorial 6 to see
Comments from tut 6
_SIO2SphereObject->_SIO2objectphysic->_btRigidBody->setActivationState( ACTIVE_TAG );
check out tutorial 6 to see
Comments from tut 6
// Activate the state of the rigid body, in case the camera
// didn't move for a while. This is necessary in order to
// apply the linear velocity. Objects that are "sleeping" cannot
// receive no new physic "inputs".
Re: _SIO2objectphysic->_btRigidBody
Have you set / marked the sphere as a rigid body in Blender (logic panel)...?
Check tutorial06 blend file and tutorial videos.
Check tutorial06 blend file and tutorial videos.
Francescu- Posts : 136
Join date : 2009-03-18
Re: Re: _SIO2objectphysic->_btRigidBody
Thank you for all the suggestions!
But...
To IanLinart: I can't activate his state (_SIO2SphereObject->_SIO2objectphysic->_btRigidBody->setActivationState( ACTIVE_TAG )) because I can't access to the _btRigidBody (It seems to be null)
To Francescu: Yes, I have marked the sphere as a Rigid Body in Blender
Any more ideas?
and thank you, thank you, thank you
But...
To IanLinart: I can't activate his state (_SIO2SphereObject->_SIO2objectphysic->_btRigidBody->setActivationState( ACTIVE_TAG )) because I can't access to the _btRigidBody (It seems to be null)
To Francescu: Yes, I have marked the sphere as a Rigid Body in Blender
Any more ideas?
and thank you, thank you, thank you
manuelmartinf- Posts : 14
Join date : 2009-09-13
Re: _SIO2objectphysic->_btRigidBody
Do you have all this logic before calling sio2ResourceBindAllPhysicObjects() by any chance?
If yes, that would explain why as the object would not be bound to a physic object yet.
If yes, that would explain why as the object would not be bound to a physic object yet.
Francescu- Posts : 136
Join date : 2009-03-18
Re: _SIO2objectphysic->_btRigidBody
Solved!!!
Thank you very much, Francescu, I have called to sio2ResourceBindAllPhysicObjects erroneously
Thank you very much, Francescu, I have called to sio2ResourceBindAllPhysicObjects erroneously
manuelmartinf- Posts : 14
Join date : 2009-09-13
Permissions in this forum:
You cannot reply to topics in this forum
|
|