Announcement

Collapse
No announcement yet.

Prevent SpringArm moving around target

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

    Prevent SpringArm moving around target

    The situation is I am working on converting my mini golf game from Unity to UE4. What I have is a pawn blueprint which contains this component hierarchy:

    [ROOT] Scene -> Ball -> SpringArm -> Camera

    You can see the setup here:

    Click image for larger version

Name:	GCxdKBs.png
Views:	1
Size:	640.9 KB
ID:	1140292

    To get an idea of what the movement should look like, here is a video from the Unity version of the game: https://www.youtube.com/watch?v=UjkCzjcWgz0

    I want the camera to follow the ball but at the moment even with the rotation inheritance turned off the spring arm is still moving around the ball even though technically there is no rotation of the arm happening. Mouse look will be added, and just rotate the camera around the ball but I'm not concerned with that right now.

    Note that in the Unity version the rotation of the ball is locked so technically the ball is just sliding around on the surface rather than actually rolling. That's of course why I didn't have this problem in Unity, and if I can just freeze the rotation of the ball in UE4 I would accept that as a solution.

    I hope my explanation makes sense, thank you for reading.

    #2
    I'm wondering now if maybe there's a better way to do this, like maybe have a separate pawn with the camera? I'm just not sure how best to structure this kind of effect.

    Comment


      #3
      Set your spring arm component to Absolute Rotation, that should fix it.

      Or, since you have scene root component, can't you just attach the spring arm to that instead of the ball? Or is it just the ball that's moving? Personally I'd make the ball the root and set the spring arm to abslolute rotation.
      Last edited by Gigantoad; 11-04-2014, 09:16 PM.

      Comment


        #4
        Thanks so much for your answer Gigantoad. Unfortunately this doesn't seem to have fixed the issue. I think I may not have clearly explained the issue, so I've just uploaded a video of the issue which should show it more clearly. I have tried both setting the spring arm's rotation and making the ball the root component (I made the scene the root again for the video).

        Comment


          #5
          Originally posted by Wayne Koorts View Post
          Thanks so much for your answer Gigantoad. Unfortunately this doesn't seem to have fixed the issue. I think I may not have clearly explained the issue, so I've just uploaded a video of the issue which should show it more clearly. I have tried both setting the spring arm's rotation and making the ball the root component (I made the scene the root again for the video).
          You can set absolute rotation in the Components or Defaults tabs.


          Also your inputs aren't being executed, the white wires are the order to execute things in. You need to drag the white wires from the event nodes to the add input nodes.

          Think of the arrows on the right of a node as "Then" pins. Do the thing in the node, THEN do the next connected thing.
          Last edited by Veovis Muad'dib; 11-05-2014, 07:17 PM. Reason: Attempting to fix image.

          Comment


            #6
            Originally posted by Veovis Muad'dib View Post
            You can set absolute rotation in the Components or Defaults tabs.
            Originally posted by Veovis Muad'dib View Post
            Also your inputs aren't being executed, the white wires are the order to execute things in. You need to drag the white wires from the event nodes to the add input nodes.
            I just disabled them while trying to get the following working ;-)

            I'll try setting the absolute rotation that way and report back, thank you for the reply

            Comment


              #7
              Hi Veovis, I set the absolute rotation in the component view now, I think I did it correctly anyway, please see attached (your attachment link didn't work BTW). No difference there either unfortunately. It seems like the absolute rotation has the same effect as disabling the inheritance of Yaw, Pitch etc. which is almost what I want but it seems like the arm is still moving around the ball when the ball rotates even though the arm isn't rotating, if that makes sense. So the movement is still the same as in the video I linked.
              Attached Files

              Comment

              Working...
              X