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: How to get ONLY the ANGLES of a CFrame?

Previous Thread :: Next Thread 
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
22 Apr 2015 10:31 PM
^
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Apr 2015 10:33 PM
CFrame - CFrame.p

CFrame:toEulerAnglesXYZ()

Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
22 Apr 2015 10:58 PM
thx
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
22 Apr 2015 11:38 PM
toEulerAnglesXYZ()

^ This is not accurate and is bound to cause mistakes if you're trying to copy one rotation to another.
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Apr 2015 11:43 PM
It sure isn't which is why I never use it. I just listed it because he didn't specify how he wanted them.
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
22 Apr 2015 11:51 PM
Well, the CLerp function I'm using uses toEulerAnglesXYZ. Should I change it?
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
22 Apr 2015 11:55 PM
You could use the module uploaded by stravant if you want. And if the 'CLerp' function interpolates the angles using :toEulerAnglesXYZ(), I definitely recommend you change it (I once used to do it before I realized you can't interpolate angles that way).
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
22 Apr 2015 11:59 PM
I just tried to change it, and it ended up not working with angles at all

I guess I don't have a choice right now because I've already made so many animations off of the function anyways
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
23 Apr 2015 12:36 AM
for CLERP why not use the actual CFrame components?
Report Abuse
anaIyze is not online. anaIyze
Joined: 29 May 2014
Total Posts: 2048
23 Apr 2015 01:31 PM
@cnt stop, they are inexperienced
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
23 Apr 2015 03:04 PM
You don't interpolate the components either.
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
23 Apr 2015 03:14 PM
"for CLERP why not use the actual CFrame components?"

What....

"You don't interpolate the components either."

Bingo.

You have to change the matrix into a more suitable form. Such as axis angles, quaternion rep, or the "Translate, scale, and skew" format.
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
23 Apr 2015 03:25 PM
Spherical interpolation is your friend.
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
23 Apr 2015 03:25 PM
Quaternions ftw
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
23 Apr 2015 03:29 PM
"Quaternions ftw"

Um no. I feel like people only say that because that's what the majority of everyone else finds when they Google that.

Axis-angles are far superior.
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
23 Apr 2015 03:30 PM
I've never really worked with axis angles tho
Quaternions ftw for people who are as advanced as me in math
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
23 Apr 2015 03:36 PM
I didn't mean the components from cframe:components() -_-
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
23 Apr 2015 03:55 PM
"Quaternions ftw for people who are as advanced as me in math"

Advanced as you? What is the logarithmic difference between an axis angle and a quaternion?
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
23 Apr 2015 04:25 PM
Could someone give me a CLerp function that would work with the arguments:

CLerp(mainC0, modifiedVarC0, speed)
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
23 Apr 2015 04:27 PM
"CLerp(mainC0, modifiedVarC0, speed)"

You're looking for a tweening function, not clerp. Lerp (linear interpolation) is usually to simply get a new CFrame between two CFrames, which you can use with loops to animate.
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
23 Apr 2015 04:28 PM
If you're animating welds, this could help:

http://www.roblox.com/Weld-Tweening-Function-w-Cosine-Interpolation-item?id=219384784
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