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: Scriptable CameraType body rotation

Previous Thread :: Next Thread 
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
20 Sep 2015 05:13 PM
Im using a Scriptable CameraType that locks first person, but also made it configurable to use Interpolate, SetRoll, etc.

My problem is when the player turns their camera, the character wont rotate with the camera.

I already knew that this would happen but my solution of using BodyGyros is not good because I need instant rotation without being flung around. Does anyone have a solution to this?


#code return
Report Abuse
IllegallyBlind is not online. IllegallyBlind
Joined: 07 Nov 2010
Total Posts: 1691
20 Sep 2015 05:14 PM
a) make your own character
b) set torso cframe
c) make bodygyro maxtorque really high
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
20 Sep 2015 05:15 PM
C wont work because itll be buggy
A wont work because I dont know that yet

B is what Im trying to do but I only need to set 1 axis, how would I do that


#code return
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
20 Sep 2015 05:15 PM
Torso.CFrame = CFrame.new(cam.CoordinateFrame.p,cam.CoordinateFrame.lookVector)
Like this??/
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
20 Sep 2015 05:19 PM
Morash that flung me out of the map


#code return
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
20 Sep 2015 05:22 PM
lol Well you need to remove the y axis from that :D

local lv = game.Workspace.CurrentCamera.CoordinteFrame.lookVector
local realthing = Vector3.new(lv,0,lv)
torso.CFrame = CFrame.new(torso.CFrame.p,realthing)
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
20 Sep 2015 05:23 PM
aaargh I meant*****
Vector3.new(lv.X,0,lv.Z)
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
20 Sep 2015 05:25 PM
humanoidRootPart.CFrame = CFrame.new(hrp.Position, hrp.Position + v3(camera.lv.x, 0, cam.lv.z))

btw i have 5,447 tix
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
20 Sep 2015 05:27 PM
It works at first but breaks when I die


#code return
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
20 Sep 2015 05:29 PM
Thx dermon <3


#code return
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
20 Sep 2015 05:30 PM
@Dermon, Whats the difference between adding and not adding? Since rotation doesn't have nothing to do with position...
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
20 Sep 2015 05:31 PM
lookvector is direction k

btw i have 5,447 tix
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
20 Sep 2015 05:32 PM
whew saved!! "doesn't have nothing to do"
:D
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