B4J Question Box2d and B4J - position of a falling dynamic body.

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
how to get the position of a dynamic body?

It does not work.

B4X:
Sub Process_Globals
    Dim bd2 As jbBodyDef
  End Sub


Sub Timer_Tick
    World.Step(1/Timer.Interval, 8, 3)
    Canvas.ClearRect(0, 0, Canvas.Width, Canvas.Height)
    Canvas.DrawRect(0, 0, Canvas.Width, Canvas.Height, fx.Colors.Black, True, 0)
    Log(bd2.position.y)
    World.drawDebugData
End Sub

Thank you.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…