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: lookVector on x, y axis?

Previous Thread :: Next Thread 
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
06 Jan 2012 06:41 PM
I was thinking...
And if I were to do something like P.CFrame.lookVector * 20 but on the Y axis instead of Z...
How exactly would that be done >:o
I tried many diffrent scenarios but none worked...
Report Abuse
Aaaboy97 is not online. Aaaboy97
Joined: 05 Apr 2009
Total Posts: 6612
06 Jan 2012 06:44 PM
I believe part of the CFrame matrix is TopVector and RightVector, I don't know which parts are though.
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
06 Jan 2012 06:48 PM
CFrame.new(
x, y, z,
R00, R01, R02,
R10, R11, R12,
R20, R21, R22
)

Well x,y,z is obvoiusly CFrame.p :/
One of the other three rows is for Rotating the object. Im just gonna take a lucky guess and say thats the second row.
Which leaves two more rows :/
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
06 Jan 2012 06:49 PM
'second row'
By second row I meant R00, R01, R02
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
06 Jan 2012 06:53 PM
I just replied on your other thread.

[I need to learn an Algorithm to deal with noobs.]
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
06 Jan 2012 06:55 PM
@Ratex
K ill check it out :/
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
06 Jan 2012 07:03 PM
[ Content Deleted ]
Report Abuse
xvgigakid is not online. xvgigakid
Joined: 22 Jun 2008
Total Posts: 4407
06 Jan 2012 07:06 PM
So...
x, y, z, --Position(x,y,z)
R00, R01, R02, --X Axis
R10, R11, R12, --Y Axis
R20, R21, R22 --Z Axis

And to get the distance from the Z axis you would ussually do CFrame.lookVector * x

How would I get the distance from the x/y axis?
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
06 Jan 2012 08:23 PM
[ Content Deleted ]
Report Abuse
Merlin11188 is not online. Merlin11188
Joined: 20 Dec 2007
Total Posts: 4158
06 Jan 2012 08:30 PM
Just a minor correction.
All 3 of those rows are rotation.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
06 Jan 2012 08:53 PM
local R = {CFrame:components()}
Position = ( R[1], R[2], R[3] )
RightVector = ( R[4], R[7], R[10] )
TopVector = ( R[5], R[8], R[11] )
BackVector = ( R[6], R[9], R[12] )

The remaining three are obviously just the negations of those above.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
06 Jan 2012 09:02 PM
^That'll be good to know.

­<'+1 Post. Ujelly?'>
Report Abuse
1waffle1 is online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
07 Jan 2012 01:42 AM
I thought it was just x, y, z, rotX, rotY, rotZ, useless, etc.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
07 Jan 2012 12:34 PM
"I thought it was just x, y, z, rotX, rotY, rotZ, useless, etc."

That wouldn't be very useful. The whole benefit of using a Matrix like that is that you don't have the problems associated with using axial rotations. It's just unit vectors so all calculations end up being really easy to do.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
07 Jan 2012 02:24 PM
A facing direction also needs a direction for which way it is twisted around the axis.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
07 Jan 2012 02:53 PM
That's why a CFrame can be modeled as 3 unit vectors.

One unit vector also needs a rotation, but three unit vectors unambiguously defined a rotation in 3D space. (With 1 you have an infinite number of possible rotations around that axis, and with 2 you have two possible rotations, which are mirror images of and and other)
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