Announcement

Collapse
No announcement yet.

Arrow Projectile Trajectory

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Arrow Projectile Trajectory

    Hi guys,

    I'm building a small game in Blueprints and I've stumbled upon this problem:

    I have an arrow projectile (not an arrow component, just a mesh with physics enabled inside an actor) that i want to shoot so that it hits the point that the player is staring at.
    The thing is, I've managed to do this by shooting the arrow straight in front of the character and disabling gravity, but i want my arrow to have a curved trajectory (influenced by gravity).

    My guess is that i have to get the position that the player is looking at (i know how to do this) and calculate the trajectory. Should i use a Spline Component with preset points that i adjust and have the mesh follow it, or is it better to rely on impulse and Physics?
    If using the latter, how would i go about calculating the impulse? Is there a function or node that does something along these lines?

    Thanks for your time!

    #2
    Well you need to decide if you want simulate physics or not. If you are then use physics and impulse.

    You also can predict projectile trajectory by just calculating it from 1/2*a*t^2 formula and get quite accurate marker for where arrow hits.

    Also do not make auto aim for player. it ruins fun, display center of screen marker and let player add elevation.

    Comment


      #3
      Check out my Projectile trajectory Project & Tutorial Here , it may help you !
      Website [ LINK ]
      Twitter [ LINK ]
      Support ! [ LINK ]

      Comment

      Working...
      X