Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raycast2D not casting to the right position when casting the ray in code #47167

Closed
mkhoi07 opened this issue Mar 19, 2021 · 1 comment
Closed

Comments

@mkhoi07
Copy link

mkhoi07 commented Mar 19, 2021

Godot version:

3.2.3

OS/device including version:

Windows 10

Issue description:

Casting a raycast2D to a position using code doesn't cast the ray to the right position.

Like this example where i cast the ray onto the mouse's global position but the ray doesn't cast to the correct position:
gif

Steps to reproduce:
In code, just cast a ray into the position of any object and the ray won't cast to the exact location of the object.

Minimal reproduction project:

RaycastIssue.zip

@Calinou
Copy link
Member

Calinou commented Mar 19, 2021

Duplicate of #34805 and possibly others.

This is due to mouse coordinates being reported incorrectly by Godot, rather than the raycast preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants