Staredit Network > Forums > SC2 Custom Maps > Topic: Trigonometry Cannon Concept
Trigonometry Cannon Concept
Oct 25 2013, 12:18 am
By: Bolshevik09  

Oct 25 2013, 12:18 am Bolshevik09 Post #1

- Overview -
Using the law of Sines, this concept shows a accurate simple way to have missile-to-wall collision.
Using basic trigonometry, this is achievable.
Please use this concept in your map if you will. Please credit this system if you do use it.

- How it works -
A player controls a unit such as a Photon Cannon in a rectangular battlefield with 4 corner points.
When the unit attacks, 4 if/then/else actions, determine which side of the battlefield the angle of attack is within. (which wall the missile will contact)
The triggers will then create a virtual triangle to determine where the missile will go. 9 variables consisting of 3 sides, 3 points and 3 angles.
The first point is the location of the Cannon, the second is a corner of the battlefield, and the third is the impact location. (what we are solving for)
The first side is distance from the cannon to corner, the second and third are from cannon to impact and impact to corner. (unknown lengths)
The first angle is the angle from the cannon to the corner contrasted to 0 degrees, the second is from the corner to the cannon contrasted to 0 degrees, and the third unknown.
Using the law of Sines and knowing Angle Side Angle, we can find the missing variables.
Then the triggers will simply create a missile unit and send him to the third point for impact. Voila!

This method uses very little system resources and is 100% accurate.
I've uploaded a demonstration map to to see for yourself. [Trigonometry Cannon Concept, by bolshevik09]
Please try it out and leave feedback on this forum. Thank you!

You can view pictures here


  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:33 pm]
Suicidal Insanity -- feasible is a great wor for stuff like that xD
[06:30 am]
Ultraviolet -- :lol:
[03:35 am]
jjf28 -- easy not necessarily the word I'd use, but should be doable
[05:43 pm]
Zoan -- NudeRaider
NudeRaider shouted: Zoan yes you can.
oh, yeah you’re right. Then yeah if you use an ai script it should be easy to farm unfinished buildings in some unused area on the map and just move them around, right?
[2019-10-17. : 6:06 am]
NudeRaider -- KrayZee
KrayZee shouted: Voyager7456 Somehow I misread your shout. "Glad I can entertain you in Nude" as if you sent a racy photo, video or something.
nah, he just made a comment that had us laughing very hard.
[2019-10-17. : 6:02 am]
NudeRaider -- Zoan
Zoan shouted: sraw531 you can’t move buildings afaik
yes you can.
[2019-10-16. : 10:03 pm]
Dem0n -- no
[2019-10-16. : 8:26 pm]
GGmano -- Is here a forum only for temple siege?
[2019-10-16. : 4:20 pm]
KrayZee -- Voyager7456
Voyager7456 shouted: Glad I can entertain you Nude
Somehow I misread your shout. "Glad I can entertain you in Nude" as if you sent a racy photo, video or something.
[2019-10-16. : 2:26 pm]
martosss -- Moose
Moose shouted: martosss IIRC, the plan was to go 64-bit only eventually so they're interested in differences between the versions
well I might have found 1 bug for them to fix - some maps load on 32 bit, but not on 64 bit game version
Please log in to shout.

Members Online: Roy, C(a)HeK, GGmano, ymoxez, MTiger156