Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | DimitriyPS | |
Old Version | Published before Godot 3 was released. |
In continuation of the question: How to find out about collisions with StaticBody - Archive - Godot Forum
Really need the help.
“_fixed_process
” I cyclically is called a “move
” for the door. I move the door only on the Y-axis. But the collision with the game character causes displacement of the door along other axes. This is tantamount to the destruction of the location.
Tell me how to avoid it.
You keep calling move
when the door hit the character?
Because if the move
hits a body and the body keeps pushing (rigid body in particular), move
will try to get the door out of overlapping, displacing it on other axis.
Using set_translation is better if the door needs to push/ignore other bodies.
If you need to use move
so it stops, you can try like some “real” doors and move it a bit up when is_colliding
or just stop moving it if is colliding.
eons | 2017-01-17 18:01
If you need to use move so it stops, you can try like some “real”
doors and move it a bit up when is_colliding or just stop moving it if
is colliding.
I’m trying to do. But this does not preclude the displacement of the door in the space when it rises after the collision (when the character is not under the door and presses on her front).
Using set_translation is better if the door needs to push/ignore other
bodies.
set_translation
I definitely like it more. But in this case is_colliding
not see the collision. This is possible using set_translation
to know about the clash?
The point is that I tried both ways.
DimitriyPS | 2017-01-17 21:02