Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to find the CFrame relative to a part with variable rotation?

I need to find the CFrame relative to a part in direction of his rotation. I don't know how to explain this, I hope you do not take this in the wrong way.

           Y
         _u_  <----u = The wanted CFrame
        |   |
        |   |
        |   | <---- Part
     X  |__ |


                Y
               _u_ <----u = The wanted CFrame
              /   /
             /   /    
            /   / <---- Part with unknown rotation 
           /   /
       X  /___/

I think I can use the rightVector, lookVector or upVector of the CFrame of the part, and the size to know the magnitude away of the part.

If this question is not understood, plys tell, so I can try to clarify it.

Any help will be appreciated.

2 comments

0

I'm not quite sure what you're trying to do. Please elaborate. From what I think you're asking, it seems you need to look into Raycasting: http://wiki.roblox.com/index.php?title=Raycasting

0

@Goulstem He's asking, erm... Think like which side of your head is closer to wall, your face or back of your head. 'Y' is wall, head is part, and surface is U. If you're looking to wall it means U is your face.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.