#Find the hidden normal

16 messages · Page 1 of 1 (latest)

woeful stone
#

This cube is supposed to extend on click/drag, that means instantiate another one of itself exactly 1 tile to the side, but as you can see i cannot access the back two faces, i want to be able to click on the side of the top face in the direction i want to instantiate.
How to detect from mouse movement which way it is going on the top face? I am using a StaticBody3D with the input_event signal

celest scaffold
#

maybe you can add some Area2D on top of it to capture the mouse position

chilly idol
#

@woeful stone I think you have to use this...

project_ray_normal()

woeful stone
#

well it's hidden from the camera so it's not really a way

#

i ended up placing two other areas on the hidden sides and duplicating code

#

not the cleanest but itworks

chilly idol
#

If you know one, calculate the other.

woeful stone
#

and the normal is supplied in the input_event for some reason

woeful stone
chilly idol
#

Oh, is that a problem for you.

woeful stone
#

because it's impossible

#

well now it is because i added a manual override with areas3d

chilly idol
#

I see

woeful stone
#

I'll mark it as solved i guess?

chilly idol
#

Good luck