0 votes

Hi all, I'm trying to create a 3rd person camera, and I'm using RayCast to detect occlusions, but the RayCast movement is not smooth

Here are two gifs showing how it looks, from the camera perspective, and from a second camera perspective, for reference:

Basically the ray moves up and down, not following the exact center of the camera
And here is the code:

var raycast = get_node("RayCast")
raycast.visible = true
raycast.enabled = true
raycast.cast_to = $Camera.translation

Anyone has any tips?

in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.