Announcement

Collapse
No announcement yet.

Gaining back control

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

    Gaining back control

    Hello there. This is my first post asking for help as I'm new to unreal but have experience in Blender.
    After following some tutorials, I was able to set up a trigger volume where the players view is glided on to the center of a hallway. My problem is, I don't know how to give the player back control from the last frame that cameras sequence ends with. Here I've recorded my screen to illustrate. Any help would be greatly appreciated. Also I'm using blueprints as I have no experience with coding.


    #2
    Originally posted by Nebula 480 View Post
    Hello there. This is my first post asking for help as I'm new to unreal but have experience in Blender.
    After following some tutorials, I was able to set up a trigger volume where the players view is glided on to the center of a hallway. My problem is, I don't know how to give the player back control from the last frame that cameras sequence ends with. Here I've recorded my screen to illustrate. Any help would be greatly appreciated. Also I'm using blueprints as I have no experience with coding.

    I just looked at some code I have for the exact same thing, the only difference is I'm calling GetPlayerCharacter instead of using the level BP reference, so I'd try that first.

    But... having done that, when the camera switches back, you will not be in the hallway any more, because your character is still back in the room. That's a bit more of a problem.

    Basically, once you've finished the level sequence, you'll need to move the player pawn so they're camera lines up with the matinee camera ( thinking about that )...

    Comment


      #3
      Originally posted by Nebula 480 View Post
      Hello there. This is my first post asking for help as I'm new to unreal but have experience in Blender.
      After following some tutorials, I was able to set up a trigger volume where the players view is glided on to the center of a hallway. My problem is, I don't know how to give the player back control from the last frame that cameras sequence ends with. Here I've recorded my screen to illustrate. Any help would be greatly appreciated. Also I'm using blueprints as I have no experience with coding.

      Yeah, there's a transform between the player character position and the player camera position. Somehow you need to run that transform backwards so you know where to put the character so that their camera lines up with the matinee cam.

      It sounds complicated, but I know it's only a couple of nodes, just not sure which ones... yet.

      Comment


        #4
        Originally posted by Nebula 480 View Post
        Hello there. This is my first post asking for help as I'm new to unreal but have experience in Blender.
        After following some tutorials, I was able to set up a trigger volume where the players view is glided on to the center of a hallway. My problem is, I don't know how to give the player back control from the last frame that cameras sequence ends with. Here I've recorded my screen to illustrate. Any help would be greatly appreciated. Also I'm using blueprints as I have no experience with coding.

        Ok, something like this:

        Click image for larger version  Name:	transform.JPG Views:	0 Size:	169.1 KB ID:	1742095

        The top part makes the transform from player camera to pawn position, the lower part applies that transform to the matinee cam and then moves the pawn to that position.

        It might be NUTS, but give it a go.

        If it does work, you'll probably find the player is in the correct position, but not facing the right way. In that case, you have to break out the player transform and use the rotation as input to SetControllerRotation.

        So, I tried it. It was NUTS, so this does work ( similar concept ) but only does location, but I think you get the idea:

        Click image for larger version

Name:	loc1.JPG
Views:	44
Size:	115.9 KB
ID:	1742100
        Click image for larger version

Name:	loc2.JPG
Views:	43
Size:	88.6 KB
ID:	1742102
        Attached Files
        Last edited by ClockworkOcean; 04-06-2020, 06:53 AM.

        Comment


          #5
          Originally posted by Nebula 480 View Post
          Hello there. This is my first post asking for help as I'm new to unreal but have experience in Blender.
          After following some tutorials, I was able to set up a trigger volume where the players view is glided on to the center of a hallway. My problem is, I don't know how to give the player back control from the last frame that cameras sequence ends with. Here I've recorded my screen to illustrate. Any help would be greatly appreciated. Also I'm using blueprints as I have no experience with coding.

          And finally! ( hey, just showing my working... ), here's the code:

          So, get the difference between player camera and pawn:

          Click image for larger version

Name:	gettransform.JPG
Views:	60
Size:	141.3 KB
ID:	1742106

          Later, apply that to match the matinee cam:

          Click image for larger version

Name:	apply.JPG
Views:	44
Size:	154.2 KB
ID:	1742107
          The end.

          Comment

          Working...
          X