Announcement

Collapse
No announcement yet.

Problem on aim

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

    Problem on aim

    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_...FVJdUJITkJBazQ
    As you can see, I have a blueprint (made using this guide: https://forums.unrealengine.com/show...-on-mouse-over!)) 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?
    Last edited by Jezeph; 03-17-2016, 06:24 PM.

    #2
    up didn't find a solution yet

    Comment


      #3
      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

      Comment


        #4
        Oh sorry, first time I use G drive. Maybe.. this one? https://drive.google.com/file/d/0B_V...ew?usp=sharing

        Anyway, these are the blueprints.
        Click image for larger version

Name:	Cattura.JPG
Views:	1
Size:	78.8 KB
ID:	1102736
        ..where this is Get Ray and Plane:
        Click image for larger version

Name:	Cattura2.JPG
Views:	1
Size:	75.6 KB
ID:	1102738

        I don't think this problem could be caused by the custom cursor, it happens also when I use the standard cursor.

        Comment


          #5
          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?

          Comment


            #6
            I made some progress today. This is my actual shooting bp (only the projectile spawning part):
            Click image for larger version

Name:	Cattura.PNG
Views:	1
Size:	185.7 KB
ID:	1102831

            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) ->[https://www.dropbox.com/s/b8muf0jgvk...0458.mp4?dl=0], 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:
            Click image for larger version

Name:	Cattura.JPG
Views:	1
Size:	117.8 KB
ID:	1102832
            Click image for larger version

Name:	Cattura.PNG
Views:	1
Size:	34.1 KB
ID:	1102833

            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)
            Last edited by Jezeph; 03-20-2016, 03:51 PM.

            Comment

            Working...
            X