Non-convex Collision Box (Tank with Cannon) #1708
Replies: 2 comments 3 replies
-
@rumansaleem I'll have some time to look at this sometime this week |
Beta Was this translation helpful? Give feedback.
-
At the moment I don't think you can do this with a single "collidable" body but specifically for this case, I would ask whether it's actually that important for the cannon to be collidable? In practice, for this I would use two Actors and move them in tandem. In every top-down tank game I've played, usually the body moves independently from the cannon (e.g. keyboard moves tank, mouse cursor points cannon). This is also how a tank is physically put together so that would make sense. Unless I wanted things to collide with the cannon, I wouldn't make it collidable but you could if they are two separate actors. That is how you'd handle it right now without official support for combining convex shapes into non-convex boundaries. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any work around for the proper collision detection for non convex bodies such as a tank with a cannon?
Beta Was this translation helpful? Give feedback.
All reactions