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: The math behind CFrame.new(VecA,VecB)?

Previous Thread :: Next Thread 
lego555444 is not online. lego555444
Joined: 21 Sep 2008
Total Posts: 1383
13 Sep 2015 01:30 PM
Does anyone know the math behind CFrame.new(VectorA,VectorB)?
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
13 Sep 2015 01:32 PM
er no actully I have no idea tbh but


CFrame.new(0,10,1) -- creates a position equal to that, along with a rotation equal to 0 which should make the end result

CFrame.new(0,10,1,1,0,0,0,1,0,0,0,1)
Report Abuse
lego555444 is not online. lego555444
Joined: 21 Sep 2008
Total Posts: 1383
13 Sep 2015 02:11 PM
plis
Report Abuse
Foreboding is not online. Foreboding
Joined: 22 Aug 2010
Total Posts: 19154
13 Sep 2015 02:12 PM
Its graphs

X, Y, Z


#code print ("Shots fired, ready for the war!") -- Currently working on Gui's
Report Abuse
XanthicDragon is not online. XanthicDragon
Joined: 19 Jul 2011
Total Posts: 2780
13 Sep 2015 02:18 PM
When you do something like CFrame.new(a, b), it does something like this (If I remember correctly)

#code
local x,y,z = Point1.X, Point1.Y, Point1.Z
local x1,y1,z1 = Point2.X, Point2.Y, Point2.Z

local angle_x = math.deg(math.atan2(x1-x,z1-z))
local angle_y = math.deg(math.atan2(x1-x,y1-y))


"Jet Fuel Doesn't Melt Dank Memes" --xCMCxSCOOTALOOx
Report Abuse
lego555444 is not online. lego555444
Joined: 21 Sep 2008
Total Posts: 1383
13 Sep 2015 02:26 PM
foreboding... I'm not talking about coordinates we all know what those are... I'm asking how a new cframe is generated from a point facing another
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 02:33 PM
The angles between the 2 vectors are gotten?
Report Abuse
lego555444 is not online. lego555444
Joined: 21 Sep 2008
Total Posts: 1383
13 Sep 2015 02:35 PM
And and we can use cross product + axis angle rotation? that may work
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