Download

Any idea what I am doing wrong here?

Alright, here is what I am trying to do. I have a top down template. I am trying to move the camera swing arm incrementally between two vectors by reducing or increasing the z value of its location by the variable ZoomIncrement when the mouse wheel is used. This blueprint looks like it should work to me, but it doesn’t. I also tried using world location in place of relative location but that didn’t work either. I know this is probably something easy that will make me feel like a dumbass, but I am still learning this blueprint stuff.
My Blueprint

When asking for help, it’s useful to detail your expected results and the actual results. “Doesn’t work” is a very broad term.

Are your BP nodes executed? Did you try to run in debug more or add a Print String node somewhere to check?

When I was working on my zoom I found that the Z axis, for whatever reason, does not like to be subtracted from. So, I tried to ADD a negative number. It worked.

Our methods are a little different but it might work for you too.

If it doesn’t work, try:

Yeah I didn’t think to run a print string (doh). My result is that nothing happens when I scroll my mouse wheel. I was in a hurry to get it posted before I ran out the door for work this morning. Now, I am at work and can expand. I did run a debug and it didn’t highlight anything, even when I moved the mouse wheel up or down (I do have that mapped in the action mappings, maybe when I get home, I should try to just use the mouse wheel up or down event). I am trying to get the overhead camera to move in closer by reducing the z value by 100 each time the mouse wheel is scrolled up to a max position of 0,0,0 (MaxZoomIn vector variable). Then I want to be able to put in the opposite code for mouse scroll down where it moves the camera swing arm up by 100 each time until reaching 0,0,1000 (MaxZoomOut vector variable).

Come to think of it, as I sit here and type this, I don’t think I set my Zoom Increment variable, which would likely be the issue. Sigh Like I said, I was trying to crunch it out this morning and running short on time. I will give it a go today after work and see if I just figured out my own issues. I guess my question now is, does that blueprint look like it will work for all intents and purposes? I wasn’t sure if relative location was the correct thing to use, but it seemed more correct than world location. Thanks for making me think it through!

Thanks, I will give that a shot if my other options fail. That looks like it should work as well too.

just a head up that zoom in/out is usually better done with FOV change and turn rate(further you zoom, the slower you turn)