1
\$\begingroup\$

I am making a 2d user build spaceship game that allows the user to place thrusters where they would like. I've read a bunch of posts in a lot of places including stack exchange on how determine the lateral force and torque force.

My problem so far with the information that I have is that it seems to me that they all are assuming that the axis of rotation for torque will always be at the center of mass. Obviously a well designed thruster placement will have the rigid body rotate about its center of mass but some damage can ruin that and to be frank I want the user to be able to make not well designed ships just because it's fun.

My main question really is what terminology am I missing that allows me to find out the relationship between the center of thrust and the center of mass so that I can find the true rotation axis for torque.

Here is an example of a craft that won't rotate about its center of mass:

example of rotation problem

\$\endgroup\$
2
  • \$\begingroup\$ I posted this on a separate forum as well and you are the second person to tell me that. If that is the case then not only is my job much easier but it also blows my mind. I feel like if I grab a pencil on its end but leave it on the table then apply similar forces as the image then it doesn't rotate around its center of mass. Hardly scientific I know but because I can't seem to google the right words for this specific problem its what I have to go on. \$\endgroup\$ Aug 12 '21 at 19:53
  • \$\begingroup\$ I'm no physicist, but I think the underlying truth of rotation is that it doesn't exist (in our world). Physical rotations are just many translations tied together in a specific way. Like the idea of a rigidbody is just a super simplified model of our physical reality. You can imagine how a softbody is a truer model of reality where there is no rotation, just translations of nodes which are specific joints which make the body maintain some sort of coherent shape. You aren't "rotating" your pencil, you're pushing up against its particles which are rigidly interconnected so it maintains shape. \$\endgroup\$
    – Charly
    Aug 12 '21 at 20:05
1
\$\begingroup\$

(consolidated my comments and moved them into this answer)

Physics Answer

I'm fairly certain rigidbodies do always rotate around the center of mass. The thing is that if the thrusters aren't directly negating eachothers' forces (say if they're irregularly placed), then there will simply be a rotation about the center of mass AND a translation. See this post for a more thorough and rigorous explanation.

Real (game design) Answer

I actually had this exact same problem for a game I was making where players could design their own (2D) ships.

If you want to let players have reasonable (in terms of controllability) centers of rotation no matter their design, then I wouldn't worry about modelling physical reality in the first place -- in fact, I would avoid it. I've found personally that asking the question "is this physically accurate" can often become an excuse (for the programmatically inclined) to avoid the work game design.

Instead I would try to think of the set of ship designs I want to allow in my game, and then design faux physics systems to support these designs. Specifically I would think try to find a good balance between allowing players creating visually eccentric and fun designs, while still having their placement decisions have meaningful(/interesting) effects on the ships' handling.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .