Re: Rotating parts of compound body
Posted: Thu Feb 13, 2020 1:45 am
Just a bit of a follow-up question: is there anything wrong with storing an instance of a SubgroupCollisionFilter and reusing that for multiple physics bodies? Would you recommend that or not? If I don't reuse filters, couldn't I theoretically have two bodies that belong to the same group and subgroup, but have different collision masks, and therefore the bodies with which they would collide could differ?
Additionally, when it comes to substepping, I wanted to clarify—is a substep kind of like a regular physics timestep, except that it's run internally? I've already encountered this with cannonballs, so I can only imagine it getting worse once I work on bullets, but is one better than the other (extra timesteps vs substeps) at preventing fast moving objects from going through solid objects (like walls)?
I'm still not sure why I would choose to timestep more often instead of using substepping, or vice versa—I don't really understand the pros and cons of each.
Thanks for the help
EDIT: I've got the capstan collision working now, but I forgot to ask—is there a way to prevent the capstan body from rotating around its local Y axis due to forces, while allowing me to change its rotation programmatically/directly? I'd like to manually rotate the body when a player uses the capstan to raise the anchor, but I don't want it spinning around when the player stands on it or something.
Additionally, when it comes to substepping, I wanted to clarify—is a substep kind of like a regular physics timestep, except that it's run internally? I've already encountered this with cannonballs, so I can only imagine it getting worse once I work on bullets, but is one better than the other (extra timesteps vs substeps) at preventing fast moving objects from going through solid objects (like walls)?
I'm still not sure why I would choose to timestep more often instead of using substepping, or vice versa—I don't really understand the pros and cons of each.
Thanks for the help
EDIT: I've got the capstan collision working now, but I forgot to ask—is there a way to prevent the capstan body from rotating around its local Y axis due to forces, while allowing me to change its rotation programmatically/directly? I'd like to manually rotate the body when a player uses the capstan to raise the anchor, but I don't want it spinning around when the player stands on it or something.