|
| 21 Dec 2015 11:43 AM |
I have this:
cam.CoordinateFrame = CFrame.new(ship.ColCam.Position - (ship.ColCam.CFrame.lookVector - Vector3.new(0,ship.ColCam.CFrame.lookVector.y,0)) * CamRadius, ship.ColCam.Position)
And another long bit of script which keep the Camera fixed to a part's Z and Y axis so it will rotate in those directions with the part but I'm stuck with the X axis line.
I thought that line for the Y axis would be of use.
(In case I'm mixing up X and Z, I mean if the part rolled backwards or forwards then it would be rolling on that axis) |
|
|
| Report Abuse |
|
nox7
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 27467 |
|
|
| 21 Dec 2015 11:50 AM |
The best way is to just copy the matrix of the part you need to look at and with the same direction. Then adjust that to push it back for a third-person view.
cam.CoordinateFrame = ship.ColCam.CFrame * CFrame.new(0,0,-1 * CamRadius) -- Object-space adjustment relative to original CFrame |
|
|
| Report Abuse |
|