Hi everyone, I need help with this problem (sorry for the bad quality of the video, I was in a hurry): https://drive.google.com/open?id=0B_V9msX4QBSZdFVJdUJITkJBazQ
As you can see, I have a blueprint (made using this guide: [4.9] Custom Cursors using UMG Widgets (with image change on mouse-over!) - Community Content, Tools and Tutorials - Unreal Engine Forums) that shows up a custom cursor on the screen, where the mouse cursor is;
I have also a blueprint that makes my character facing always the mouse cursor.
These blueprints are supposed to make my character fire where I aim with the mouse cursor, but he always shoot in the wrong direction.
I think that this problem is partly caused by the animation, but I noticed that, in a less bad manner, also when my character was not animated yet.
What can I do to solve that?
up didn’t find a solution yet
Your video seems to be set to private so we can’t watch it, also it will probably be hard to help without seeing the relevant blueprints
Oh sorry, first time I use G drive. Maybe… this one? https://drive.google.com/file/d/0B_V9msX4QBSZdFVJdUJITkJBazQ/view?usp=sharing
Anyway, these are the blueprints.
…where this is Get Ray and Plane:
I don’t think this problem could be caused by the custom cursor, it happens also when I use the standard cursor.
I would say that the direction he shoots the arrow is not in line with the character’s forward vector, the character facing seems to be working correctly but the arrow is offset. How do you calculate the direction for the arrow, can show the part of the blueprint where you spawn it?
I made some progress today. This is my actual shooting bp (only the projectile spawning part):
The projectile was spawned using a vector field, attached to the character mesh: that was the problem, because the idle and shoot animations of the character are not perfectly aligned with the x-axis, so the vector field wasn’t the same way.
Putting instead its capsule component as input in the projectile spawn transform, the shoot is a lot more precise (but not perfect yet), because the forward axis of the capsule component is always on the X axis.
As you can see in this video (sorry for the bad quality) ->[Dropbox - File Deleted], in fact, now the arrow goes in the right direction (except for a little bit of imprecision yet, caused by the animation, I think).
But There is still a problem: The character is not facing the X axis yet:
So it seems that the character “shoots askew” the arrow. I’m pretty sure that this is caused by the animations… I was wandering if I could rotate them in some way…
(I can’t simply rotate the character mesh in the bp because it would screw up the movement keys)