Announcement

Collapse
No announcement yet.

ToggleVisibility not working perfectly on character zoom in and out.

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

    ToggleVisibility not working perfectly on character zoom in and out.

    I have setup a zoom in and out on my characters Camera Boom, which is working fine, but also wanted to have the character disappear as the camer moves into a first person view.
    It works perfectly on the zoom in but then stutters the visibility on and off as I zoom back out. I have tried over a dozen setups and this is the closest one I have come to.
    Any suggestions on how to improve it would be welcome.

    Click image for larger version  Name:	UE4Editor_20200211_172013.png Views:	0 Size:	179.9 KB ID:	1720111

    #2
    Originally posted by ajbombadill View Post
    I have setup a zoom in and out on my characters Camera Boom, which is working fine, but also wanted to have the character disappear as the camer moves into a first person view.
    It works perfectly on the zoom in but then stutters the visibility on and off as I zoom back out. I have tried over a dozen setups and this is the closest one I have come to.
    Any suggestions on how to improve it would be welcome.

    Click image for larger version Name:	UE4Editor_20200211_172013.png Views:	0 Size:	179.9 KB ID:	1720111
    In a nutshell, it's not the way to do it. Two problems, one is you're leaving the animation of the transistion to the mouse wheel, the other is you don't need to move the camera.

    This kind of thing is most easily achieved with view targets. Here's how view targets work:

    https://www.youtube.com/watch?v=uW86ZGxesmc

    And I WAS going to link to a vid showing the correct way to change views, but most of the youtube vids are going about it the wrong way. You will see a lot of stuff manipulating the spring arm, which is incorrect. And a lot of stuff using SetActive to change cameras, which wont give you a smooth transition.

    The best and easiest way to do it is to leave the normal 3p camera alone, and stick a new camera right in the head of the player. Then all you have to do it SetViewTargetWithBlend to change cameras. No messing about with spring arms and vector maths...

    Check out Zof ( puzzle game ) on Steam:

    https://store.steampowered.com/app/1414480/Zof/

    Comment


      #3
      Originally posted by ClockworkOcean View Post

      In a nutshell, it's not the way to do it. Two problems, one is you're leaving the animation of the transistion to the mouse wheel, the other is you don't need to move the camera.

      This kind of thing is most easily achieved with view targets. Here's how view targets work:

      https://www.youtube.com/watch?v=uW86ZGxesmc

      And I WAS going to link to a vid showing the correct way to change views, but most of the youtube vids are going about it the wrong way. You will see a lot of stuff manipulating the spring arm, which is incorrect. And a lot of stuff using SetActive to change cameras, which wont give you a smooth transition.

      The best and easiest way to do it is to leave the normal 3p camera alone, and stick a new camera right in the head of the player. Then all you have to do it SetViewTargetWithBlend to change cameras. No messing about with spring arms and vector maths...
      Thanks for the suggestions and link. The issue with that option is you are left with only a few fixed views, the player cannot scroll to their own personal view distance, and so it lacks the individual customization that I am looking to achieve. If you know of any other way to achieve this I would be happy to learn.

      Comment


        #4
        Originally posted by ajbombadill View Post

        Thanks for the suggestions and link. The issue with that option is you are left with only a few fixed views, the player cannot scroll to their own personal view distance, and so it lacks the individual customization that I am looking to achieve. If you know of any other way to achieve this I would be happy to learn.
        Sorry, didn't read it carefully. So, basically you need to use the mouse as a trigger for the zooming, but put the control of the smoothness under something else. Like this:

        https://www.youtube.com/watch?v=zWXonVxsB0o

        When the camera is within a certain distance of the player, you can just hide the player mesh.
        Check out Zof ( puzzle game ) on Steam:

        https://store.steampowered.com/app/1414480/Zof/

        Comment

        Working...
        X