Mouse Scroll Camera Zoom?

Rocker742

New Member
Reaction score
0
So currently I'm working on a map that uses a 3rd person camera on your hero.. and I was wondering how to make it so when you scroll up it zooms in and you scroll down you zoom out with your mouse scroll. Currently for that function I use the Up and Down Arrow keys, which I feel is kind of a hassle, moving your hands everywhere and whatnot..

For good measure here are some of the triggers for my Camera(s)

Red Camera
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Camera - Lock camera target for Player 1 (Red) to CameraUnit[1], offset by (0.00, 0.00) using The unit's rotation
Camera - Set Player 1 (Red)'s camera Distance to target to CameraDistance[1] over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Angle of attack to 345.00 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Height Offset to 100.00 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Rotation to (Facing of CameraUnit[1]) over 0.10 seconds


Camera Away Red
Events
Player - Player 1 (Red) Presses the Down Arrow key
Conditions
(Integer(CameraDistance[(Player number of (Triggering player))])) Less than 2000
Actions
Set CameraDistance[(Player number of (Triggering player))] = (CameraDistance[(Player number of (Triggering player))] + 100.00)


Camera Closer Red
Events
Player - Player 1 (Red) Presses the Up Arrow key
Conditions
(Integer(CameraDistance[(Player number of (Triggering player))])) Greater than 0
Actions
Set CameraDistance[(Player number of (Triggering player))] = (CameraDistance[(Player number of (Triggering player))] - 100.00)


Help would be greatly appreciated :D..

I've seen the scroll able to manipulate the camera's zooming in D3W.. so I know its possible.. but I'm hopeless D:
 

Dirac

22710180
Reaction score
147
I dont really think there's a way to detect mouse scroll... but i found some weird stuff in your triggers.
1.- Looks like you copied it manually... you can right click > copy as text
2.- 0.01 periodic lags a lot.. use 0.1
3.- Applying the camera over 0.1 secs every 0.01 secs bugs lol
4.- Your trigger isnt MPI, but tries so hard. Use Loop to achieve it
 

Rocker742

New Member
Reaction score
0
Well, for #1.. I just copied the thread I posted on THW that noooooooooobody was even looking at and posted it here, although i did do that originally. (The copy as text stuff).. For #2 and #3, after you pointed that out I busted out laughing and then I thought, hey.. hes right. lol.. I'll change that right away. As for #4.. Please explain..
 
Reaction score
341
:nuts:

Alright, whenever a player scrolls, their camera angle will go up or down depending on what direction they scrolled in.

Use that to move the camera up/down by checking the cameras Angle of attack.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top