Hello,
I have a bunch of boxes that are falling due to gravity. I’m trying to figure out how to detect if they’re still falling/moving/repositioning on the ground.
I looked at speed and angularSpeed inside the body object, but they’re always 0.
What am I doing wrong?
Best regards,
Luke
I think that body.speed
and body.velocity.y
should be nonzero if it’s moving.
it reports these random values:
speed 0
velocity.y 4.547473508864641e-13
speed 4.547473508864641e-13
velocity.y -4.547473508864641e-13
speed 4.547473508864641e-13
velocity.y 0
speed 2.842170943040401e-14
velocity.y 4.547473508864641e-13
speed 4.547473508864641e-13
velocity.y -4.547473508864641e-13
speed 4.556346636343676e-13
Those are very nearly zero.