worldXOf
Returns where the point (localX, localY) of body, measured from its centre of mass in its own frame, is in the world, across.
Samples
val world = PhysicsWorld()
val bar = world.rigidBody(Shape.box(40f, 4f), x = 100f, y = 50f, angle = (PI / 2).toFloat())
// The bar's right end, in its own frame, after a quarter turn clockwise: straight below.
assertTrue(world.rigidBodies.worldXOf(bar, 20f, 0f) in 99.9f..100.1f)
assertTrue(world.rigidBodies.worldYOf(bar, 20f, 0f) in 69.9f..70.1f)Content copied to clipboard