Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do i detect the rotation of a surface thats been touched?

Asked by 6 years ago

Trying to make a tool where you throw down a spinning motion detector and it connects to a wall/floor/ceaing the corect way up depending on the surface its on. I know how to make the rest of the tool but I'm clueless to how to do this part of it.

0
Hmmm.... My first thought is raycasting, casting rays at four corners to determine a surface rotation. CootKitty 311 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Perhaps you can use CFrames to do it. Get the part that was touched and then read the orientation values of that part's CFrame. To make it "the correct way up" just copy the touched part's values to make it the same orientation.

Ad

Answer this question