Help:Can i set any rotation or scale to TriangleMeshShape?

ocean2oo6
Posts: 18
Joined: Thu Nov 15, 2007 2:01 pm
Location: Sichuan province, China

Help:Can i set any rotation or scale to TriangleMeshShape?

Post by ocean2oo6 »

I'm confused about the collisionobject's worldtransform.
can i set rotation or scale param to this matrix?
if i have a TriangleMeshShape, but in a real world,i set a scale to its worldtransform,just like this:
[33,0,0,0,33,0,0,0,33,0,0,0,33,0,0,0]... could bullet still detect the collision according to its real world object?
thx in advance for any input! :D
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Help:Can i set any rotation or scale to TriangleMeshShape?

Post by Erwin Coumans »

ocean2oo6 wrote:I'm confused about the collisionobject's worldtransform.
can i set rotation or scale param to this matrix?
if i have a TriangleMeshShape, but in a real world,i set a scale to its worldtransform,just like this:
[33,0,0,0,33,0,0,0,33,0,0,0,33,0,0,0]... could bullet still detect the collision according to its real world object?
thx in advance for any input! :D
You should not the world transform for any scaling. It is fine to use translation and rotation.

If you want to use a scaling for the collision shape, use btCollisionShape::setLocalScaling instead.
Hope this helps,
Erwin