Announcement

Collapse
No announcement yet.

Projectile initial rotation changing along Yaw no matter what.

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

    Projectile initial rotation changing along Yaw no matter what.


    Just so all the variables are on the table, I'm attempting this in the Third Person Example Project, in case it matters.

    -- Whenever I spawn a projectile and activate the projectile component on it. if it crosses a certain threshold along the Z (Yaw) Axis, it decides to mirror it on the previous side. This threshold exists between -90 and 90 degrees.

    Click image for larger version  Name:	YawRotationPRoblem.png Views:	0 Size:	74.1 KB ID:	1794660

    Say I wanted to spawn a Projectile at 150°, the actual projectile will spawn with a rotation of 30°.

    It matters what rotation I spawn the actor with when calling the SpawnActor node. But if i go inside the Projectile's BP and on construct set a separate rotation, or even on tick set a rotation of 0, it will still shoot in the same wrong direction. Which is weird because the velocity is along the actor's relative X-axis. Meaning that if the relative X-axis changes, then the direction that the initial velocity uses should change with the rotation, yet it decides not to.

    (This still happens if I turn off Auto Activate in the projectile movement component, then in the construction script change the rotation, and then activate it afterwards.)



    As per near the end of the video, the projectiles decide to mirror the rotation along that threshold.

    I've dealt with problems pertaining to Yaw-skips? like this before but I can't find any solid documentation about my problem. Any help would be greatly appreciated.

    #2
    Hi man,
    can you post a screenshot of how you spawn the proiectile and how do you set it in motion?

    Comment


      #3
      Originally posted by Est_engine View Post
      Hi man,
      can you post a screenshot of how you spawn the proiectile and how do you set it in motion?
      Sure thing,

      Click image for larger version

Name:	c70cccaaca276fc57b145d4aae517103.png
Views:	48
Size:	120.8 KB
ID:	1794869

      Click image for larger version

Name:	d3646264d9749e08fac3a54de0ed980b.png
Views:	30
Size:	287.5 KB
ID:	1794870

      Initial Speed = 3000, Max Speed = 3000,

      Click image for larger version

Name:	70d23dc56c779e7d244a322fd37e6ceb.png
Views:	28
Size:	304.3 KB
ID:	1794871

      Projectile Comp Details:

      Click image for larger version

Name:	5953a466846901fa0671e3e89e81f43e.png
Views:	27
Size:	63.5 KB
ID:	1794872

      Velocity = 3000 on X Axis.

      Click image for larger version

Name:	b55b73540e4eace6173c5ff2fd48e910.png
Views:	27
Size:	62.8 KB
ID:	1794873

      Click image for larger version

Name:	4c8396afcabee97558bbce32959bc6bc.png
Views:	25
Size:	43.2 KB
ID:	1794874

      I've literally just copied from the FPS example project and dissected it for a few hours and there's nothing that I think I'm missing. And if I am, it will be something obvious that I'm oblivious to right now.

      For completeness' sake, the rotation problem doesn't change if I change the input of the rotation into the spawn transform. Meaning if I change the Get Control Rotation to a Get World Rotation attached to my FP Camera, the problem persists.

      Comment


        #4
        Hi man,
        i cant reproduce the issue,
        weird

        Try remaking the bullet from 0.
        Create an actor, add a sphere, add a proiectile component, set 3000 speed and max.
        Spawn the proiectile using the player rotation, but in a safezone , like in front of your character/gun, where there are no collision with nothing.

        Comment


          #5
          Figured it out.

          I set up the object response after I set up the sphere that's used as a reference for spawning. Turns out it set that sphere to block the bullet as well.

          F

          Comment

          Working...
          X