0 votes

Hello, I'm doing a raycast and I want to change the color of the object that the raycast hits, how can I do that?

asked Jul 15, 2019 in Projects by Qushy (34 points)

1 Answer

0 votes
Best answer

Use get_collider() to get the node the ray has hit, then change it's color either by altering the albedo color or the material's texture.

answered Jul 15, 2019 by Magso (2,851 points)
selected Jul 16, 2019 by Qushy
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.