Arrow Projectile math problem

Hello UE wizards!

I think I have a simple problem but I just can’t wrap my head around it…

I want the arrow to not spawn so far into the tree or object it hits… im pretty sure i can just subtract some value from the forward vector and add that to the location?? but my brain cant do math right now

pleeeease

I hope these screenshots work

the rotation works so where ever i shoot it i just want to spawn it back like 20 cm from the impact location

I think you can reach your objective by simply adjusting the location of the static mesh relative to the root from the viewport, but if you wanna go with this:

You can multiply the forward vector with -20 and add it onto the original spawn location.

Hope these help! :innocent:

2 Likes

thank you so much! I knew you guys were wizards.

I actually had to get the right vector, i forgot i rotated the arrow to get it to shoot straight lol.

i looked for the root and/or any kind of viewport vectors in the node search and couldn’t find anything, im unfamiliar with viewport nodes except adding widget to viewport…

It’s working pretty good now, im always game for making things more efficient though!

Now if i can just make the arrows stick straight upish when they hit the ground at a parallel angle lol but its good for now, i can still grab them. thank you again!! happy new years!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.