Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you simulate a conveyor in bullet physics engine?

I am writing a simulation in which we need some boxes to be fairly accurately modeled as they move on a set of conveyors. Currently we detect if the box is colliding with the static conveyor surface and apply an impulse to each box according to what the conveyor speed is supposed to be. Is there a way to make the actual conveyor surface move and have it either wrap around or kind of dissolve on the outfeed end and grow from the infeed end? Just the names of which bullet classes and methods to use would really help.

like image 447
Matthew Smith Avatar asked Sep 16 '10 01:09

Matthew Smith


1 Answers

You can use special friction mode, with a target velocity and direction to simulate a conveyor.

See http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&p=21441#p21441 for a working demo and implementation.

like image 53
Erwin Coumans Avatar answered Oct 21 '22 10:10

Erwin Coumans