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

How to limit a part's look vector?

Asked by
ffejyos 10
5 years ago

Basically, I have a script that makes a part rotate towards another part but I only want the part to rotate if the other part is in front of it...

I shouldn't need to put my code here since all I'm doing is simple CFrame manipulation.

0
you could check if the dot product of the two vectors is equivalent to 0 theking48989987 2147 — 5y
0
the two vectors being the lookvector of one of the parts and the unit vector of the difference of the positions of the two parts theking48989987 2147 — 5y
0
and there really isn't any case when you shouldn't display your code theking48989987 2147 — 5y
0
and if statment should do? starmaq 1290 — 5y
0
ill go for the dot product ffejyos 10 — 5y

Answer this question