I’ve tried to research this but still haven’t found a clear cut answer. So, what does the normal mean/do? Every time I print my normal it just seems like some random coordinate. Not only that, but when I create a part at the raycast Normal, it’s always near/at the origin. Can anyone clear this up for me?
The surface normal is a vector, which can be imagined as a description of an arrow in 3D space.
In the example given by @jody7777, the arrow is a representation of the vector that is perpendicular (aka normal aka at a 90 degree angle to) the surface at that point.
A Vector3 is described as such because it is a vector with 3 components, normally (x, y, z). Now let’s say that the length of the arrow in the above image is 5 units. It is shown to be pointing straight up, in the positive-…
I believe you are confusing raycast result position with raycast normal in this situation.
An example use of case of raycast normal is to orient a part with the ground:
Rather than trying to convert this up vector into an angle which is also complicated it’s better to leave it I would rather use
@EgoMoose advanced CFrame technique to leave it in terms of vectors.
We can obtain a CFrame rotation to align the current persons “UpVector” to the new surface upvector. Here is an example script and video.
The advantage of this method is that it will allow you to rotate along the new upVector without having to specify a right vector as a CFrame.fromMatrix solution.
From the sources you’ve sent, it seems that raycastNormal is a direction, not a position, right?
Yes that is correct it is a direction vector
Alright, thanks, I understand now.
I love getting the occasional notification that my reply from over 4 years ago is still getting linked to haha! Hope it helped
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.