Skip to main content
GameDev.net gamedev.net
🔒 Locked

3D rotation problem

Started by silencekk Jan 1, 2007 at 7:19 AM 0 replies 350+ views
Original Post
silencekk
silencekk
Given point 0,1,0 rotated about the Z axis by 90 degrees: The result should be -1,0,0 correct? x' = x*cos(omega) - y*sin(omega) y' = x*sin(omega) + y*cos(omega) z' = z Apply to the formula x' = 0*cos(90) - 1*sin(90) y' = 0*sin(90) + 1*cos(90) ??? I know it is wrong…….but why………..???? please help.........
Ezbez
Ezbez
In most programming languages, sin and cos will take an angle in radians not degrees.
FYI about Radians:

radians = degrees * PI / 180
degrees = radians * 180 / PI

There are 2 PI radians in a circle
0 degrees is 0
90 degrees is PI/2
180 degrees is PI
360 degrees is 2 PI

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.