Which collision object should I use.

Post Reply
erbisme4@yahoo.com
Posts: 41
Joined: Fri Apr 29, 2016 2:41 pm

Which collision object should I use.

Post by erbisme4@yahoo.com »

What collision object would be the best for a completely user-driven simulation on an object with the mouse? There is no gravity, and when I stop dragging the item it stops moving. I need to be able to drag an object into another, and it apply forces on the dragging one accordingly. I was looking into btRigidBody with the CF_KINEMATIC_OBJECT flag.

Thanks in advance!
codetiger
Posts: 19
Joined: Sat Aug 18, 2012 2:20 am
Location: Chennai, India
Contact:

Re: Which collision object should I use.

Post by codetiger »

For user created geometry we use ConvexHull Shape which works best for any shape (remember to use shapehull to optimize the shape for speed).

But for static objects trianglemesh shape works better and allows concave shapes also.
erbisme4@yahoo.com
Posts: 41
Joined: Fri Apr 29, 2016 2:41 pm

Re: Which collision object should I use.

Post by erbisme4@yahoo.com »

I want it to behave similar to the kinematic character controller, where all movement is done by user input, except I want the movement to be done by the mouse instead of keyboard. Any recommendations for the setup to use? btRigidBody with cf_kinematic_object flag?
codetiger
Posts: 19
Joined: Sat Aug 18, 2012 2:20 am
Location: Chennai, India
Contact:

Re: Which collision object should I use.

Post by codetiger »

Convexhullshape or and other primitives shapes should work just fine for any scenario.

So you can just disable gravity and have any primitive shape or convexhull shape. It should work just fine.
Post Reply