Sunday, September 11, 2022
HomeGame Development2nd - Calculate angle for arrow tip to hit a degree

2nd – Calculate angle for arrow tip to hit a degree


For an archer in my recreation, I need to calculate the launch angle to hit a degree (x,y) when fired from (0,0). The preliminary energy is understood, so I take advantage of the next system:
https://en.wikipedia.org/wiki/Projectile_motion#Angle_percentCEpercentB8_required_to_hit_coordinate_(x,_y)
Formula

The issue is that the arrow is just not a degree and relying on the angle the archer shoots at, solely the placement of the bottom of the arrow is fixed. The displacements from the bottom of the arrow to the middle of the arrow, which is the middle of gravity and the arrow tip are depending on the angle. These displacements are of the shape (cos(theta), sin(theta)) * r the place r is a few fixed. i.e. the arrow is rotated by the goal angle round its base. Because the arrow travels by means of the air it’s rotated round its middle to face the course it’s transferring.

How can I calculate the angle required for the tip of the arrow to hit a degree?

Instance for instance (two totally different angles, base of arrow = blue, middle of gravity = inexperienced, tip of arrow = purple):

Example

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments