|
| 17 May 2016 09:59 PM |
So like the question says, I'm trying to get BodyGyro to only rotate in the X and Z axis in the direction of mouse.hit. Right now I have a loop that rotates my "engine" (Just a part) on the y axis. This line of code appears in a loop while "D" is held down on the keyboard:
engine.BodyGyro.cframe = engine.CFrame*CFrame.Angles(0,-.3,0)
Then I have another line of code while I'm holding my mouse button 1 down:
engine.BodyGyro.cframe = mouse.Hit
How would I have mouse.Hit's X,Z rotational coords affect BodyGyro's cframe in the X,Z direction? Thanks for the help! |
|
|
| Report Abuse |
|
| |