Page 1 of 1
m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT ?!?
Posted: Wed Nov 01, 2006 4:34 am
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.
Re: m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT ?
Posted: Wed Nov 01, 2006 2:56 pm
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
Re: m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT ?
Posted: Wed Nov 01, 2006 7:04 pm
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?
Re: m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT ?
Posted: Wed Nov 01, 2006 7:30 pm
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
Re: m_collisionFlags !=btCollisionObject::CF_STATIC_OBJECT ?
Posted: Wed May 28, 2025 3:58 am
by goosesensor
Erwin Coumans wrote: ↑Wed Nov 01, 2006 2:56 pm
You should not set the linear velocity for static objects. Only dynamic and/or kinematic objects can ever move.
Thanks,
Erwin
I have a question. What is the meaning of setting velocity on a kinematic body? The world will not move this body, only user code, correct?
Thanks,
Morgan