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: Rotations are weird

Previous Thread :: Next Thread 
Dwarlon is not online. Dwarlon
Joined: 18 Jul 2013
Total Posts: 4604
10 Apr 2014 06:42 PM
I am making an animation, and I have as follows (I'm testing rotations)

p = script.Parent
while true do
p.CFrame = CFrame.new(-21.02, 4.27, -7.11)* CFrame.Angles(90,0,0)
wait(.5)
p.CFrame = CFrame.new(-21.02, 4.27, -7.11)* CFrame.Angles(0,0,0)
wait(.5)
end

I have tried SO many angles on the 3rd line, but they all rotated in a weird way. They don't rotate 90, they rotate 45, and 45 rotates at some undefined angle...
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 06:42 PM
isn't it math.rad(90)?
Report Abuse
TomsGames is not online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
10 Apr 2014 06:44 PM
Hey there!

The issue your having is the CFrame.Angles() part.

Whatever number you put in, it uses that number in RADIANS. Noooo!

We don't want that, so to fix that use this:

p.CFrame = CFrame.new(-21.02, 4.27, -7.11)* CFrame.Angles(math.rad(90),0,0)

That turns it to degrees, which is what you want.

Hope this helps!
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 06:45 PM
u got ninja'd
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Apr 2014 06:45 PM
or should I say spider'd
Report Abuse
Dwarlon is not online. Dwarlon
Joined: 18 Jul 2013
Total Posts: 4604
10 Apr 2014 06:49 PM
Thanks!
Report Abuse
Ariophy is not online. Ariophy
Joined: 08 Mar 2014
Total Posts: 81
10 Apr 2014 07:14 PM
l0l
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