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: I want to rotate a cframe smoothly to a set point

Previous Thread :: Next Thread 
popdosprlte is not online. popdosprlte
Joined: 18 Dec 2009
Total Posts: 4801
29 Oct 2013 05:58 PM
I want to rotate a cframe to a blorh radian angle, but smoothly.
How would i do this?

If I do Blah.CFrame * CFrame.Angles(0,0,Bleh) it will move smoothly, but will go forever.

If I try to stop this by using CFrame:toEulerAnglesXYZ().Z and checking to ensure that it is not rotated beyond Blorh, it will error.

Why is this, and is there a different method I could use?
Report Abuse
Pillaged is not online. Pillaged
Joined: 14 Jul 2013
Total Posts: 59
29 Oct 2013 05:59 PM
Do a ton of those CFrame.Angles things OR use motors.
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
29 Oct 2013 06:03 PM
Here's the most fun (and coincidentally, the most accurate) method you can do:
http://wiki.roblox.com/index.php/User:XLEGOx/quaternioninterpolate

I also have an example (made from scratch) at my place that uses the same concept of quaternions.
Report Abuse
popdosprlte is not online. popdosprlte
Joined: 18 Dec 2009
Total Posts: 4801
29 Oct 2013 06:03 PM
@Pillaged

I'm trying to stop rotating at a specific radian.

so like this:

while wait() do
if CFrame is rotated on Z axis less than 2 radians then
cframe = cframe * cframe.ankles(0,0,0.01)
end
end

I'm trying to figure out what to put in that if statement
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
29 Oct 2013 06:07 PM
ankles
Report Abuse
popdosprlte is not online. popdosprlte
Joined: 18 Dec 2009
Total Posts: 4801
29 Oct 2013 06:08 PM
@cntpleasebygodkillme

Pseduocode only needs to make sense
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
29 Oct 2013 06:12 PM
CFrame::components
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
29 Oct 2013 06:13 PM
I don't think OP read what I posted...
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