#how do you make crosshairs snap to rotate on the surface they are on?

17 messages · Page 1 of 1 (latest)

whole yoke
#

Suppose i have a crosshair model thing that sets position to the hit position of a raycast using a 30hz receiver. how do i make it so that the rotation of the crosshair matches the rotation of the surface it is on?

undone island
verbal owl
whole yoke
rich nacelle
# whole yoke whats that?

Surface normal is the direction the surface your hitting is facing

So for example, if you are hitting flat ground, the normal is (0,1,0), since surface is facing upwards

#

So if your crossair is facing the surface normal, it will lay flat along the surface

whole yoke
#

nvm im just gonna be lazy and set the rotation of the crosshair to the rotation of the trigger handle

rich nacelle
#

mate

#

the raycast you are using has 2 outputs

#

You are using Hit Position

#

you need to set the rotation to Surface Normal

whole yoke
#

im sorry but i still have no idea what surface normal is even with the explanation you gave me

#

oh crap

#

im dumb

#

i didnt realize it was an output on the raycast chip

#

im so sorry