开发者

How can I rotate a Box2D body without applying a force to it?

开发者 https://www.devze.com 2023-01-24 03:09 出处:网络
Anyone know?All I can see is ApplyTorque and SetAngular开发者_如何学编程Velocity, I want to just rotate the object before adding it to the simulation, for example: so I have one crate tilted up agains

Anyone know? All I can see is ApplyTorque and SetAngular开发者_如何学编程Velocity, I want to just rotate the object before adding it to the simulation, for example: so I have one crate tilted up against a wall and another flat.


Use SetTransform, you can specify the position and orientation of your object.


Maybe something like a matrix rotation will help you

0

精彩评论

暂无评论...
验证码 换一张
取 消