Collision point moving around even when character is still

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By alpanagi

Hi all,

I have a Raycast as a child of my camera, which in turn is a child of my character.

When moving the camera I get the correct collision point from the Raycast. If I add gravity though, even when the character is staying still the collision point deviates by a considerable amount. Example values are:

(-0.81121, 0.076689, -6.694593)
(-0.853282, 0.028879, -7.04114)
(-0.70973, 0.192567, -5.854981)
(-0.844342, 0.038993, -6.967905)
(-0.680005, 0.226524, -5.609015)

Relevant code in _physics_process:

var movement = Vector3()
vertical_speed = clamp(vertical_speed - delta * 20, -9.8, 100)
# movement.y += vertical_speed
move_and_collide(movement)

if $Camera/RayCast.is_colliding():
    var point = $Camera/RayCast.get_collision_point()
	print(point)

Relevant code in _input:

if event is InputEventMouseMotion:
	$Camera.rotation_degrees.x = clamp($Camera.rotation_degrees.x - event.relative.y * 0.1, -89, 89)
	$Camera.rotation_degrees.y -= event.relative.x * 0.1

Any idea why that would be the case?