I'm trying to do a top-down mini golf game to learn the Godot engine. So the question is that how to rotate KinematicBody precisely so that it collides the ball every time. Now it collides only when the rotation speed is low enough. With higher speeds, it goes through.
If I understand the physics engine right it doesn't recognize the collision because the stick clips inside the ball between frames. So the question is how this should be done? I didn't figure out how
move_and_collide() would help me in this situation because I'm not moving the stick. I'm just rotating it so it can hit the ball. Here's a pic from the side angle if it helps
And here is the current code. I tried to do the same with
rotate_object_local() without success.
const LOOKAROUND_SPEED = 0.01
var mousePos = Vector2()
mousePos = Vector2()
transform = transform.orthonormalized()
if event is InputEventMouseMotion:
mousePos = event.relative