Rotation of complex object

P_Kras
Posts: 2
Joined: Sat Oct 24, 2015 6:57 pm

Rotation of complex object

Post by P_Kras »

I'm creating space ship.
ship1.png

Ship consisting of modules. Each of them have btRigidBody. Contacting modules connected with constraints.
Four small spheres at sides are maneuvering thrusters.
I want to control my ship by applying forces to them.
When I tries to apply force like this:
ship3.png
everything is ok, ship is moving forward.
But when I tries to rotate ship (yaw in this case) ship isn't rotating.
ship3.png
I also noticed that when I apply side force to only one thruster (can't attach fourth image, look at second) ship is moving sideway but not rotating.

I'm sure there is something wrong with constraints here. I tried to use fixed, hinge and dof6 constraints but it didn't help.
You do not have the required permissions to view the files attached to this post.
P_Kras
Posts: 2
Joined: Sat Oct 24, 2015 6:57 pm

Re: Rotation of complex object

Post by P_Kras »

I've found problem. I didn't call m_shape.calculateLocalInertia() and didn't specify inertia in rigid body constructor.