Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
|
| 23 Aug 2014 09:22 AM |
Player.Character.Torso.CFrame.lookVector
This will point in the direction he is facing. For example, if he was facing north, I think it would be Vector3.new(1,0,0)
And if he was facing north-east, I think it would be Vector3.new(0.5,0,0.5)
I'm not sure, I might be totally wrong about the whole concept. Look up CFrames on the wiki and it will tell you what lookVector does, in case I am wrong. |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 23 Aug 2014 09:30 AM |
Okay, would this work then?
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector |
|
|
| Report Abuse |
|
|
Waffloid
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1606 |
|
|
| 23 Aug 2014 09:42 AM |
no.
~ I'm not crazy, the voices in my head said so! ~ |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 23 Aug 2014 09:44 AM |
| then why don't you help me fix it instead of just saying "No." |
|
|
| Report Abuse |
|
|
Waffloid
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1606 |
|
|
| 23 Aug 2014 09:47 AM |
coz idk what u need.
also, lookvector is a vector3, and camerasubject is for a object value.
try this?
lookV = game.Players.LocalPlayer:WaitForChild('Torso').CFrame.LookVector game.Workspace.CurrentCamera = CFrame.Angles(lookV.X,lookV.Y,lookV.Z)
~ I'm not crazy, the voices in my head said so! ~ |
|
|
| Report Abuse |
|
|
Waffloid
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1606 |
|
|
| 23 Aug 2014 09:47 AM |
or possibly
lookV = game.Players.LocalPlayer:WaitForChild('Torso').CFrame.LookVector game.Workspace.CurrentCamera = CFrame.Angles(lookV.X,lookV.Y,lookV.Z)+game.Workspace.CurrentCamera.CoordinateFrame.p
~ I'm not crazy, the voices in my head said so! ~ |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 23 Aug 2014 10:05 AM |
| what I want is the camera to target where the player is facing, this doesn't seem to cut it |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
Waffloid
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1606 |
|
|
| 23 Aug 2014 01:32 PM |
Not sure what you mean, can you elaborate? May be able to help.
~ I'm not crazy, the voices in my head said so! ~ |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 23 Aug 2014 02:33 PM |
| If you played/watched DayZ Standalone, you'll know the camera style is the player facing backwards at all times, while they face therever the mouse points using lookvector, only that it's evaluated on the X axis to make sure the player's feet won't lift off of the ground. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2014 03:51 PM |
| cam.CoordinateFrame = CFrame.new(cam.CoordinateFrame.p, head.Position) |
|
|
| Report Abuse |
|
|