Announcement

Collapse
No announcement yet.

3rd Person Zoom Camera

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

    3rd Person Zoom Camera

    Hi. This is my zoomable camera setup.
    i just added +/- 20point to SpringArmComponent's Target Arm Length. I used basic 3rdperson project from engine.
    Camera animation is not smooth, any tips for that?

    Last edited by maxdark; 04-05-2014, 06:08 PM.

    #2
    Not sure if you found an answer or not since you posted this, but I think a Lerp may be what you need to smooth it out. So I'd look into that if you're still working on this

    Though you could always use a number like 5 instead of 20, as it would be harder to notice the jumping. Though it would move a lot slower lol.

    Comment


      #3
      Wisdomcube2000
      I am still working on this

      Here is my update.

      Hold right mouse button to rotate cam setup / 3rd person cam tepmlate based)






      Attached Files

      Comment


        #4
        Interesting use of the compare float macro!
        To get it to be smooth, use the InterpTo function on a tick. I did it by creating a variable like DesiredCameraDistance and I add/subtract to/from it with the mouse wheel, clamping it between a MinDistance and maxDistance variable. Then, each tick it calls the InterpTo using the DesiredDistance as the destination and the current spring arm length as the current.

        Hope this makes sense!

        Comment


          #5
          For smoothing the Zoom here are pics on how I did this. What it does in every frame is checked for CameraIsZooming. This happens any time the Mouse Wheel is scrolled up/down. If we are zooming then go ahead and make any adjustments to the arm until the difference between Desired (mouse scrolled) and Current Boom Length is less than 2.0 units.

          I use a Tick Event with a Sequence to update the camera each frame for these items.
          - Both Branches
          - Set CameraBoomCurrentLength
          - Set CameraBoomZoomDifference & Set CameraBoomTransitionValue

          This is very adjustable to your personal taste.
          Camera Min: 75.0
          Camera Max: 600.0
          ZoomValue: 20.0

          Click image for larger version

Name:	Delta Event Seconds.png
Views:	1
Size:	45.5 KB
ID:	1056262

          Click image for larger version

Name:	Camera Set Desired Distance.png
Views:	1
Size:	245.9 KB
ID:	1056263

          Click image for larger version

Name:	Camera Zoom Smoothing.png
Views:	1
Size:	188.0 KB
ID:	1056264
          Last edited by Olander; 02-21-2017, 04:11 PM.

          Comment

          Working...
          X