- #1
CheatyFace
- 9
- 0
Homework Statement
i Pmed some mentors but they said i should post it at forum, i asked Astronuc that if its ok to post this in forum and he told me to post it in this section.. i know some users here are very senior and surely have the knowledge to this and i want to learn. it is a trajectory based game where you shoot an object up in air and it should hit the ground where your target is located (where you want it to hit) so you have to fix the angles, distance of you and your target and how deep/high your target is in order to you.. as the speed is always constant FULL POWER. this equation is at nr.2
Homework Equations
angle = atan((v^2 +/- sqrt(v^4g(gx^2+2yv^2)))/gx)
The Attempt at a Solution
for this game the relevant constants are:
g = 1, v = 0.287p, where p is a value from 5-100 (5 is minpower, 100 is maxpower). Distances are in pixels. for one reason: Shooting at max power (full bar) eliminates any measurement error in determining the muzzle velocity of the projectile, as firing at maximum power guarantees that p is always exactly 100.
Example of how the game works..
here you can see me shooting few shots and then aiming and trying to hit the target it takes me 3-4 tries to fix the angle and hit perfect.. but using the above equation, putting in distance, height/weight of target, it would give you an angle to shot in (full power) and it would hit your target with just 1 try..
another video different map.
WHAT IS THE PROBLEM? : i am wondering which values to put in x and y.. i am guessing x would be the Distance between me and the target and Y would be the how deep/high the target is.. but how should i find x and y? if i use a ruler to find the distance between me and Target it would give me in cm/inches so should i put x in cms or must i convert it to Pixels? i have almost solved it out, just need help with what values i must put in x and y.
solving the above equation would give a angle to shot in. I can also give reward to the one who helps me, Astronuc said it is not allowed to give reward to homework helps, but this is not kinda homework its something different so let's c if anyone can help.
Last edited by a moderator: