Public Group

# Using Trig in 3D Rotations?

This topic is 5463 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Say I was going to rotate a 3D field...like a fighting arena, on its y axis. I know that the matrix for y rotations involves trigonomic functions...but for that to happen, you need a right triangle and a reference angle. My question is: if it's not clearly a triangle...and it's something like a character, or an entire level....how you do determine its reference angle, and the size and location of the triangle?

##### Share on other sites
Originally sine cosine and tangent were considered to be ratios of sides of right triangles, however now they are simply functions of angles.
The formula for the matrix you have rotates a point around the axis (0,1,0) by whatever angle you specify, just transform all the points in your model by the matrix and you should have the rotations you expect.

##### Share on other sites
Quote:
 Original post by chowe6685Originally sine cosine and tangent were considered to be ratios of sides of right triangles...
No. That's just how they're introduced. They're circular functions, because they define relationships between two radii and the intervening angle of a unit circle.

Other than that nitpick, chowe6685 is spot on.

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 18
• 13
• 14
• 43
• 63