So I need help finding how long a side of a part is. I already have code that tells me which side the ray is hitting, I just need help with code to find out how long that part is.
I have not really tried anything since I don’t know where to start.
I’m confused on your issue. If you know which side it hit, then correlate that to the size of the part. Where the Right/Left is the X size, Back/Front is the Z size, and Top/Bottom is the Y size.
You might just need to draw a picture because what I just wrote is the size of that single side. You want a scalar of the surface you hit, yes? It’s the part’s size on that axis.
I labeled the different lines on the drawing of what you said, and I drew it with that information, so I thought it was appropriate to tell you what I was referencing when I started drawing. Although I think I see what you mean now.
------>
Edit: Sorry if it seemed rude, I was just trying to understand what you were saying.
The side lengths of cuboid surfaces are subsets from the cuboid’s size Vector3. If you have a surface whose normal is parallel to the objects Z unit vector, then the surface side lengths are size.Y and size.X