Detect which side of the block/object the player is looking at.

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

Is there any way to detect which side of the block that the player is looking at by using a RayCast? My block has 6 faces, all with their unique name (eg. Top, Bottom, etc.)

Could you not compare the point of collision with the location of the block?

exuin | 2022-05-19 20:20

I ended up just using a RayCast, and detecting + rounding the position using the get_collision_point() method.

SF123 | 2022-05-19 21:22

:bust_in_silhouette: Reply From: SF123

I ended up just using a RayCast, and detecting + rounding the position using the get_collision_point() method.