this is probably a very basic thing in every video game taken for granted but, I am totally lost when trying to understand the SOHCAHTOA

[quote:3kbqstwo]

A way of remembering how to compute the sine, cosine, and tangent of an angle.

SOH stands for Sine equals Opposite over Hypotenuse.

CAH stands for Cosine equals Adjacent over Hypotenuse.

TOA stands for Tangent equals Opposite over Adjacent.

Well, it turns out understanding this is hugely important in game design and still is only considered to be ENTRY LEVEL trigonometry.. lol.... :,,( my tears

But anyway, I was wondering how do I pin an object to another using this? Using Angle() (Atan2) or whatever? I have no clue. I have seen examples but dont understand it at all.

Lets say there is a rotating chair, and I want the player to always Stand behind the chair as it rotates (like 10 feet behind) and always face the same direction and the chair and stay relative to its position? D:

Pinning is fairly straightforward. Given two objects, A and B, the pinned position of B on A at distance Dist through the angle Angle is found through the following two equations:

B.X = A.X + cos(A.Angle + Angle) * Dist

B.Y = A.Y + sin(A.Angle + Angle) * Dist

Setting Angle equal to 180 would place object B "behind" object A assuming that the image for object A is facing to the right.

what IS the sine and cosine anyway? I keep studying it but my mind cant apply the right triangle to the 0 through 360 degree spectrum even when its explained to me visually.

I was told to take sine as the opposite of the angle you have and cosine is the angle but add 90degrees to it? or is it the opposite + 90 degrees?

uhh hmmm I think I almost get it. I'm having trouble understanding what exactly cosine is but I'll double check some notes on trigonometry and cross reference until I do.