generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Camera wont face Torso

Previous Thread :: Next Thread 
Cr0ws is not online. Cr0ws
Joined: 16 Aug 2013
Total Posts: 1545
20 Sep 2015 04:22 PM
cam = workspace.CurrentCamera
plr = game.Players.LocalPlayer
cam.CameraType = 6

--cam.CameraSubject = plr.Character.Torso

cam.CoordinateFrame = plr.Character.Torso.CFrame*CFrame.new(0,0,-5)
cam.Focus = plr.Character.Torso.CFrame


Pretty frustrating,everything else works but cam.Focus just won't look at the player's torso.Is there something I'm missing?
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
20 Sep 2015 04:23 PM
I have an idea how to do this, but tell me, from where will it be looking at?

So you want it to look at the torso, but from where?
Report Abuse
Cr0ws is not online. Cr0ws
Joined: 16 Aug 2013
Total Posts: 1545
20 Sep 2015 04:25 PM
Imagine you are spawning in the map and spawn in your "Character Customization" box. Pretty much the camera is simply placing itself infront of the player's torso.pretty much I want the camera to lock on a focus to his/her torso.

-Hope that helped
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
20 Sep 2015 04:27 PM
So.... to recap:

Looking from: plr.Character.Torso.CFrame*CFrame.new(0,0,-5)

At: plr.Character.Torso.CFrame
Report Abuse
Cr0ws is not online. Cr0ws
Joined: 16 Aug 2013
Total Posts: 1545
20 Sep 2015 04:29 PM
yep
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
20 Sep 2015 04:34 PM
I added a wait for testing, but this works:

wait(3)

cam = workspace.CurrentCamera
plr = game.Players.LocalPlayer
cam.CameraType = "Scriptable"

cam.CoordinateFrame = CFrame.new(plr.Character.Torso.Position, plr.Character.Torso.Position*Vector3.new(0,0,-5))
Report Abuse
Cr0ws is not online. Cr0ws
Joined: 16 Aug 2013
Total Posts: 1545
20 Sep 2015 04:40 PM
Lol it must be my place or spawnlocation positions, itll take some tweaking but thank you
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image