I know this has been asked in this forum before, but how do you do 360 degree shooting? I have TGF and do have the advanced math object.
This is all I know about triangles-
-they have 3 sides
-in a right angle triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides
-interior angles add up to 180 degrees
Can someone please explain what sine and cosine are, and their significance in a 360 degree formula?
acronym-
sine of an angl e= opp/hyp
cos of an angle = adj/hyp
tanof an angle = opp/adj
opp=opposite side
adj=ajacent side
hypp=hypotenuse side
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
3rd May, 2004 at 05:49:18 -
I've done 360 degrees shooting before, but it's still not accurate enough. I've seen 3600 degrees before aswell. Could someone tell me how to do more than 360 degrees shooting\movement?
If you do 360 degree shooting properly, then it's actually infinite directions, because you can specify a decimal angle like 47.736484 degrees to shoot at.
The formula is:
New X = X + (Cos(Angle) * Speed)
Speed is the number of pixels it will move per event read.
Same for Y but with Sin.
Yeah, with decimals you can have more accuracy than just 360 degrees. Although what you're referring to Andy is probably the direction object that came in the MMF bonus pack, which lets you choose how many directions you want.
I do it the cheap way using fastloops to tag a bullet object and a target object with the same Number and always have the bullet look at the target, it's a cheap way of doing it, but it works pretty well once you fool around with it enough.
Craps, I'm an old man!
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
4th May, 2004 at 02:43:42 -
Arf - It wasn't the movement extension. I downloaded an example from the CT boards showing how much more accurate 3600 angles were than 360. I'll take another look at the example.
James and Chicken- I know what the hypotenuse, adjacent, and opposite are, but what exactly is the "opposite over hypotenuse" and etc. acutually referring to? The length of the sides?
Tigerworks- How do you work out the cosine and angle?