Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon May 08, 2017 1:52 pm 
Offline

Joined: Fri Jan 20, 2017 10:44 pm
Posts: 21
I have 4 rigid bodies, but I want to turn on and off your collision when I want, but I can not.
I'm using the OgreBullet wrapper, but it does not affect using pure code
I thought the line was "setActivationState" but it did not work.


Top
 Profile  
 
PostPosted: Mon May 08, 2017 7:34 pm 
Offline
User avatar

Joined: Fri Nov 04, 2005 2:22 pm
Posts: 121
Code:
rigidBody->setCollisionFlags(rigidBody->getCollisionFlags() | btCollisionObject::CF_NO_CONTACT_RESPONSE);
...
and..
rigidBody->setCollisionFlags(rigidBody->getCollisionFlags() & ~btCollisionObject::CF_NO_CONTACT_RESPONSE);


maybe is good, maybe no, try....


Top
 Profile  
 
PostPosted: Wed May 10, 2017 4:13 pm 
Offline

Joined: Fri Jan 20, 2017 10:44 pm
Posts: 21
One of these lines deactivates or the other active?


Top
 Profile  
 
PostPosted: Thu May 11, 2017 11:49 am 
Offline
User avatar

Joined: Fri Nov 04, 2005 2:22 pm
Posts: 121
i7.strelok wrote:
One of these lines deactivates or the other active?


Code:
DEACTIVATE (OR)---->
rigidBody->setCollisionFlags(rigidBody->getCollisionFlags() | btCollisionObject::CF_NO_CONTACT_RESPONSE);

ACTIVATE---(XOR)->
rigidBody->setCollisionFlags(rigidBody->getCollisionFlags() & ~btCollisionObject::CF_NO_CONTACT_RESPONSE);


Top
 Profile  
 
PostPosted: Tue May 30, 2017 10:01 pm 
Offline

Joined: Fri Jan 20, 2017 10:44 pm
Posts: 21
Muchas gracias! :D :D :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider], Exabot [Bot], Google [Bot] and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group