I am making a Air Hockey game with Godot and I have some issues with the physics. The answer is probably in the docs or here but I can't find it. Take into account I am very new to Godot.
Here is my architecture:
|-KinematicBody2D # the paddle
|-StaticBodies2d # the walls
\-CollisionShape2D # the ball
(I omit all the sprite stuff, etc)
When I used set_pos() to move the paddle, when I hit the ball, the ball reacted to the collision and moved as expected. Also the paddle went throught the walls (expected behavior regarding to the function I used).
When I used move(), the paddle collided with the walls and did not go through it as I wanted but it also collided with the ball which did not move.
Is it possible to block a kinematicbody with staticbodies but not with rigidbodies in order to keep the physics stuff ?
I tried this in fixedprocess :
motion = move(motion)
if get_collider() extends RigidBody2D:
set_pos(get_pos() + motion)
But the ball acted weirdly doing so (moving slowly, strange physics bounce, etc)