m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT ?!?

Post Reply
User avatar
SteveBaker
Posts: 127
Joined: Sun Aug 13, 2006 4:41 pm
Location: Cedar Hill, Texas
Contact:

m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT ?!?

Post by SteveBaker »

OK - I give up - what is this assert telling me?

../bullet/src/BulletDynamics/Dynamics/btRigidBody.h:199: void btRigidBody::setLinearVelocity(const btVector3&): Assertion `m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT' failed.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT ?

Post by Erwin Coumans »

SteveBaker wrote:OK - I give up - what is this assert telling me?

../bullet/src/BulletDynamics/Dynamics/btRigidBody.h:199: void btRigidBody::setLinearVelocity(const btVector3&): Assertion `m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT' failed.
You should not set the linear velocity for static objects. Only dynamic and/or kinematic objects can ever move. Do you have a full callstack which system is trying to set the linear velocity? It might be a bug,
Thanks,
Erwin
Jack
Posts: 59
Joined: Thu Aug 31, 2006 11:51 am

Re: m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT ?

Post by Jack »

Erwin Coumans wrote:
SteveBaker wrote:OK - I give up - what is this assert telling me?

../bullet/src/BulletDynamics/Dynamics/btRigidBody.h:199: void btRigidBody::setLinearVelocity(const btVector3&): Assertion `m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT' failed.
You should not set the linear velocity for static objects. Only dynamic and/or kinematic objects can ever move. Do you have a full callstack which system is trying to set the linear velocity? It might be a bug,
Thanks,
Erwin
Probably it should be !(m_collisionFlags & btCollisionObject::CF_STATIC_OBJECT) instead of m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT. No?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT ?

Post by Erwin Coumans »

Jack wrote: Probably it should be !(m_collisionFlags & btCollisionObject::CF_STATIC_OBJECT) instead of m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT. No?
Definately. I'll change it in the more readable 'isStaticObject()', which is the same.

Thanks Jack,
Erwin
Post Reply