I’m getting the position of the mouse cursor with a macro named “GetRayAndPlaneIntersection” that basically returns the point that the cursor is on the world, knowing the character and the cursor’s locations we can find out the rotation and apply it to our pawn to make a kind of Aim on Mouse Cursor
Having only the rotation is working wonders for most of the cases, like for any gun’s projectiles that we can spawn them and rotate accordingly as the cursor is more far or close to our char but…
What if we have a skeletal mesh like a bow operated by an animation?
So the player decides how long will the animation draw the bow and this is deciding how far the arrow will go without spawning this arrow on release but applying force to it…
Thus now we need to look the actual aiming of the animation to be able to aim not only on rotation but to aim where the mouse cursor is, making the aim offset aiming on cursor
So the player decides how long will
the animation draw the bow and this is
deciding how far the arrow will go
without spawning this arrow on release
but applying force to it…
You’ll need more than line-plane intersection for this. Consider looking into this one:
Essentially, you feed it direction (find rotation to cursor, for example) and the length of the anim (or how long the draw bow action is held for) sets the force. The prediction node spits out interpolated points and a hit.
It’s been years since I used it but I believe that’s what you’re after here. Hope I did not mix it up.