"check" functions for physics

Right now I learn 3D physics and make test 3D project.
If I underdtood well, I need to recieve messages in “on_message” or use “event_lestener”.
But I think it’s needed to add new type of functions: “check_collision”, “check_contact_point”, “check_trigger” etc… I think, this functions will be useful in “on_input”. I think, I don’t need to wait or check “on_message” or “event_lestener”, I need to make an order “to check” same things by pressing some button.

if action_id == hash(“jump”) and check_collision() then
–make jump
end

May be I am so hobbyist that don’t understand something…

The fact that you are using 3D physics has no bearing on this. You can use the same solution as for 2D physics. You need to keep track of some state, like if you have ground contact or not. You can for instance have a look at this platformer example: https://github.com/defold/sample-pixel-line-platformer

1 Like