• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Camera Zoom with Mouse Scroll..

Status
Not open for further replies.
Level 5
Joined
Jul 19, 2007
Messages
95
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 :grin: ..

EDIT: I've seen the scroll able to manipulate the camera's zooming in D3W.. so I know its possible.. but I'm hopeless D:
 
Status
Not open for further replies.
Top