Page 1 of 1

How to specify a btBoxShape's transformation?

Posted: Wed Nov 05, 2014 12:30 pm
by lucky7456969
I want to define a box shape that has a position, probably an orientation...
How can I achieve this?
Thanks
Jack

Re: How to specify a btBoxShape's transformation?

Posted: Wed Nov 05, 2014 1:13 pm
by xexuxjy
you just set the world transform on the collision object / rigid body that's using that shape. So define your box shape, and then attach it to a collision object and update that.

Re: How to specify a btBoxShape's transformation?

Posted: Wed Nov 05, 2014 3:33 pm
by c6burns
The answer to this question is in every sample and in the wiki and in the manual. You can do this! :lol:

Re: How to specify a btBoxShape's transformation?

Posted: Thu Nov 06, 2014 5:10 am
by lucky7456969
Hi there,
Can I just create a shape without attaching any collision object to it, I need it for cooperative pathfinding
as a placeholder...
Thanks
Jack

Re: How to specify a btBoxShape's transformation?

Posted: Thu Nov 06, 2014 9:37 am
by xexuxjy
A shape by itself really doesn't do very much, and won't detect any collisions for you, you really need a collision object,rigidy body, ghost object , whatever to get anything meaningful picked up. You can even just have one collision shape (box) and lots of collision objects sharing it.

Re: How to specify a btBoxShape's transformation?

Posted: Thu Nov 06, 2014 9:55 am
by lucky7456969
Okay, thank you then, let me take some read on the documentation first.
Thanks
Jack

Re: How to specify a btBoxShape's transformation?

Posted: Thu Nov 06, 2014 6:54 pm
by c6burns
There is a method to get a transformed aabb from a collision shape by passing in a transformation. But as xexuxjy is saying collision shapes don't themselves have a transform ... that's something the collision object handles (btCollisionObject -> btRigidBody and others)