drt_t1gg3r
New member
- Joined
- Nov 2, 2007
- Messages
- 4
Hi all, novice game designer here. Not much in the math department.(Never applied myself in High school). Any way, I think this question is supposed to be in this forum and do apologize if I am incorrect.
If objectA shot a round at objectB, at what angle would he aim his weapon?
given:
speed of round: 10 units per step
distance to objectB: 600 units away
gravity: gravity gains .5 units per step (.5, 1, 1.5, etc...)
friction: friction gains .1 units per step (.1, .2, .3, etc...)
Can an angle be found if all the above is given? In my game I am trying to have a turret shoot at another turret. The artificial intellegance is supposed to find an angle to shoot at if he has a constant speed, gravity, and friction.
btw:
speed propels object along direction
friction pulls against speed(decreases speed each step)
gravity pulls down
angle can only be between 0 and 180 (0 degree is a line exending horizontally right from the x,y axis, 90 degrees is a line extending vertically up from the x,y axis, 180 degrees is a line extending horizonally left from the x,y axis and 270 is a line extending vertically down from the x,y axis)
EDIT: ObectB is 600 units away,with a missile at a contstant speed of 10 units per step, angled at a degree of 0 with no friction, and no gravity, the misisle would reach objectB in 60 steps
If objectA shot a round at objectB, at what angle would he aim his weapon?
given:
speed of round: 10 units per step
distance to objectB: 600 units away
gravity: gravity gains .5 units per step (.5, 1, 1.5, etc...)
friction: friction gains .1 units per step (.1, .2, .3, etc...)
Can an angle be found if all the above is given? In my game I am trying to have a turret shoot at another turret. The artificial intellegance is supposed to find an angle to shoot at if he has a constant speed, gravity, and friction.
btw:
speed propels object along direction
friction pulls against speed(decreases speed each step)
gravity pulls down
angle can only be between 0 and 180 (0 degree is a line exending horizontally right from the x,y axis, 90 degrees is a line extending vertically up from the x,y axis, 180 degrees is a line extending horizonally left from the x,y axis and 270 is a line extending vertically down from the x,y axis)
EDIT: ObectB is 600 units away,with a missile at a contstant speed of 10 units per step, angled at a degree of 0 with no friction, and no gravity, the misisle would reach objectB in 60 steps