BodyX
Category: 2D Game Physics (Pro)
Signature
BodyX(body As Integer)
Returns
Integer
Description
Returns the body's current center X coordinate rounded to the nearest game pixel.
Performance and behavior
Invalid handles return 0.
Pro feature: compiling code that uses this function requires a license with the GamePhysics feature enabled.
Example
DrawImage playerImage, BodyX(player), BodyY(player)