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: What exactly is .lookVector?

Previous Thread :: Next Thread 
MakerModelLua is not online. MakerModelLua
Joined: 24 Feb 2013
Total Posts: 3544
28 Nov 2015 10:09 PM
I know what it can do, and I know it's a "the facing direction (unit vector)"

But what what do the actual coordinates it returns correlate to? Just looking for a detailed explanation :)
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
28 Nov 2015 10:13 PM
the direction of the coordinateframe

PERFECT BISQUE
Report Abuse
MakerModelLua is not online. MakerModelLua
Joined: 24 Feb 2013
Total Posts: 3544
28 Nov 2015 10:14 PM
So by direction is it the rotation?
Report Abuse
jjjakey is not online. jjjakey
Joined: 15 Sep 2008
Total Posts: 13014
28 Nov 2015 11:08 PM
It's not a rotation. In the coordinate frame the lookVector is the second point of a vector that makes a line representing the direction a part is facing. A unit vector is a vector which has been reduced down to a length of 1.

So, imagine the center of a part as the first dot, the second is the look vector. Making a line from dot 1 and moving it through dot 2 you get a vector in the direction of the front face.
Report Abuse
MakerModelLua is not online. MakerModelLua
Joined: 24 Feb 2013
Total Posts: 3544
28 Nov 2015 11:12 PM
Thanks!
Report Abuse
LilMcManiac is not online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
28 Nov 2015 11:25 PM
lookVector returns the Angle of the CoordinateFrame;


Also known as the second thing returned in; CFrame.new()

CFrame.new(part.CFrame.p, ANGLE/'part.CFrame.lookVector)
Report Abuse
SnazzyBread is not online. SnazzyBread
Joined: 27 Nov 2015
Total Posts: 78
28 Nov 2015 11:30 PM
It is the way the part is facing from the FrontSurface. (I know this isn't exactly accurate (cntkillme is gonna kill me), but this is a easy way to explain it). Also, pretty sure its a Vector3 format.
Report Abuse
jjjakey is not online. jjjakey
Joined: 15 Sep 2008
Total Posts: 13014
28 Nov 2015 11:33 PM
@lilmac While those values are numerically identical on initialization, lookVector does not return the argument itself. The second argument in creating a new CFrame can be a second point which is used to create a lookvector other than 0,0,-1 (aka default forward). LookVector is calculated separately as it changes with rotation.
Report Abuse
LilMcManiac is not online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
28 Nov 2015 11:35 PM
Thats what I meant.

Sorry if I made you think otherwise.
Report Abuse
SnazzyBread is not online. SnazzyBread
Joined: 27 Nov 2015
Total Posts: 78
28 Nov 2015 11:36 PM
@Lil, just thank the bricks that cntkillme isn't here, YOU WOULD BE DEAD!
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