Zoom in/out on top down game with mouse

Hi all,

I’m trying to make a smooth zoom in and out with the mouse on a top down game.

I have a MPTopDownNetworkPawn and a MPTopDownNetworkController. I have setup the following blueprints system.
Still very new to coding. But this system doesn’t seem to work. I got it from a tutorial where it does seem to work.
Did I implement this wrong and can somebody see what I did wrong?

it doesnt work at all?

on mouse wheel down youre setting the target lenght to 0 and mouse wheel up is target arm lenght minus camera sensitivity o.0 seems weird.

if you want to smooth out things i would use FInterp

OW, I forgot to connect that node on mousewheel down but it still doesn’t work.

I did use the FInterp if you look at the “Interpolate spring arm” part in the image.

Hello Jojoba007.
I have made this a while ago so hope this will workout for you :slight_smile:
Make an axismapping in your project settings and set Mouse wheel axis.
After that try this:

Hope it will help you :slight_smile:

Hi, thx for the reply and example!

I tried it but I still cant get it to work.

  1. I did set up the mouse axis in the input project setting
  2. The “CanBoomLength” is a float variable
  3. The “camera boom” is a spring arm component
  4. The “Move Curve” is a float curve blueprint (with a nice curve)
  5. I have build this inside the MPTopDownNetworkPawn

Down in the image you can see all the blueprints I use at the moment.

You have after get float value multiply by 0. try to change that :slight_smile: and the numbers in the clamp are really high. I needed that because I was orbiting around a building so I think you can set them lower.
You can see here the smoothing in action http://atrium-amsterdam.nl/availability/.

Weird weird weird :wink: Still doesn’t work.

Can you make an screenshot from your ZoomCurveMouse? and show the values? and set print nodes behind CanBoomLength so you are sure they are being set.

Ok, I printed out CanBoomLength and it give me “server: up sroll” and when scrolling down, “server: down scroll”. Is this correct, because I dont think the mousescroll should be controlled on the server?
The pawn is multiplayer.

Here is a screenshot from the curve:

Here is an example how I did it.
The first point is 0 , 0 the second one is time 946.981018 and value 5.

Ok, used your settings but it still doenst work. Maybe it has something to do how the player pawn is setup for multiplayer or something?

If you upload your project to gdrive of dropbox I can take a look at it when I have time.

Thx you so much! I have send you a PM.

For anyone that likes to know.
was so kind to look into my project and found the solution.
In my class defualts under Actor Tick, “Start with Tick” was disabled. When I enabled it the problem was solved.

Hi all… created a Smooth Camera Zoom plugin that only needs two nodes…and no timelines… Check it out here…

teak