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 » Scripting Helpers
Home Search
 

Re: How to make lookVector the top of a brick?

Previous Thread :: Next Thread 
SmoothBlockModel is online. SmoothBlockModel
Joined: 26 Sep 2008
Total Posts: 2155
30 Mar 2013 08:45 PM
Obviously lookVector is from the Front of a Brick, is there any way to make it so its the Top instead?
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
30 Mar 2013 08:46 PM
You could rotate the CFrame upwards by multiplying by CFrame.Angles(-math.pi/2,0,0), then get that lookVector.
Report Abuse
DonnyTheDemented is not online. DonnyTheDemented
Joined: 29 May 2010
Total Posts: 1413
30 Mar 2013 08:47 PM
(Part.CFrame*Vector3.new(0,1) - Part.CFrame.p).unit
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
30 Mar 2013 08:49 PM
Alternatively, you could do this:


local LV_Up = (Brick.CFrame * CFrame.new(0, 1, 0)).p - Brick.CFrame.p

Though BlueTaslem's would be shorter to write.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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