Frankly, I have no clue where to start in doing something like this, and I would highly appreciate some help. The version of the Unreal Engine that I’m using is 4.22.3.
However, you’ll, most likely, want something with a wee bit more ooomph than an arrow. A spline + spline mesh component could work nicely and can be used to visualise an arc of a lob, for example.
As you can see in the video, the arrow makes a weird rotation whenever my cursor goes to certain areas. To combat this, I can try to constrain the arrow’s rotation to a certain range (the goal area). Once again, I am not so sure how to do this, and would appreciate some help!
That’s normal with this technique, we’re tracing from the camera into this green plane. The intersection cannot be resolved if the trace does not hit the plane.
Your request is quite unclear at this point. Do you want to trace against the geometry instead - as in the wall in the background? Do note that the cursor is in 2d and you want to interact with 3d world. You need to take that extra D from somewhere.
Do you only need to perform this test ahead of the player? Perhaps you could describe the gameplay goal? Are we shooting penalties, aiming with the cursor?
Ok, I’ll try to clarify what I mean, and if it doesn’t work, we’ll figure out something else. What I’m trying to do is have some kind of max mouse X, min mouse X, max mouse Y, and min mouse Y values. These values will represent the bounds of the goal, which I still don’t have. If the current mouse location doesn’t correspond with these min and max values, we don’t rotate the arrow and keep at its rotation before the mouse was moved. Now that I’m writing this down, implementing it seems easier that I thought. Unfortunately, I am currently away from my computer, so I can’t quickly test this out. Before I soon do so, though, do you think what I’m saying makes sense and would work?