So I have an AI of archers where I want them to hit a point on the ground.
Now since the Actor, I am using is using Inverse kinematics I need to set a point for the actor to aim at.
My idea is that the (height) of this aim object will be determined by how far the archer is away from the target object. meaning that if I set the target high enough up the archer will aim upwards
Here is a picture that shows you what I mean:
At 100 meters distance, I want the archer to shoot up into the air. What I need to calculate is how far up I need him to aim for the arrow to land at the target enemy.
I know I might also have to change the force at which the arrow is thrown but I would like to know what sort of calculation I should do to make this possible?
It is worth mentioning that i am using a
rigidbody and adding force using: