Vexture
|
  |
| Joined: 27 Jan 2011 |
| Total Posts: 630 |
|
|
| 23 Apr 2017 01:36 PM |
Over the past day or so I've been working on a glider for my game. I want the player's body to both point in the direction of the camera and to move in the direction the camera is pointing. I have managed to get the torso to move in the camera's direction; however, I'm having trouble rotating it with a BodyGyro. I'm trying to base its CFrame off of the camera's lookVector components. Here's my code:
torsogyro.CFrame = CFrame.new(x,y,z); torsogyro.P = 5000 --x, y, and z are the camera's X, Y, and Z lookVector components respectively.
I've very little experience with BodyGyros, so excuse the atrocious P value. If anybody could tell me what I'm doing wrong, I'd really appreciate it. When running this script, the torso does not rotate at all.
|
|
|
| Report Abuse |
|