Set orientation manually, disallow collisions, no dynamics..

z8000
Posts: 24
Joined: Mon Aug 04, 2008 3:54 pm

Set orientation manually, disallow collisions, no dynamics..

Post by z8000 »

I'd like to control the position and orientation of a pool cue stick in my game manually.

I don't want other objects that it bumps into to have any sort of collision response.

However, I do not want to allow it to intersect/penetrate other objects. Instead, I want the stick to magically know there's a ball in the way and thus provide some sort of minimum elevation angle or pitch that it's constrained by.

Is there any easy way to use Bullet to this end? I'm a Bullet newbie.

Thanks!
You do not have the required permissions to view the files attached to this post.
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Set orientation manually, disallow collisions, no dynamics..

Post by sparkprime »

It sounds like you just want to query the world to find out where the cue should be allowed to go.

You can do a convex sweep downwards, this should let you find the valid range of positions which do not intersect any balls or the table.

check btCollisionWorld
z8000
Posts: 24
Joined: Mon Aug 04, 2008 3:54 pm

Re: Set orientation manually, disallow collisions, no dynamics..

Post by z8000 »

Ah, perfect. Again, sorry for the n00b questions. That looks perfect.