I have a player that is holding and rolling a barrel in front of him.
I want to be able to throw the barrel vertically. I use the applyImpulse function.
The problem is, as the barrel is rotating so is it’s coordinate system. So I cannot know which direction to throw the barrel in. Instead of using the local coordinates I would like to throw the barrel along the world’s y-axis. Is there a way to do that?
I found the solution via the world2Local function in the physicsBody class.
Works like a charm, post can be closed