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 fixed to part axis.

Previous Thread :: Next Thread 
ASpoonfullOfSucrose is not online. ASpoonfullOfSucrose
Joined: 28 Oct 2015
Total Posts: 442
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 is not online. 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
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