• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] function to disable camera movement from arrow key events

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2008
Messages
502
IS there such a function to disable the arrow keys affecting the camera or do I need to manualy lock the camera?
 
Ok I thought as much. Instead of applying it every X wouldn't it be more efficient to check first if current camera is different to desired camera?
 
Don't snap the camera (apply it over .02 seconds or something), and there's no way to check if the camera has changed before applying it.

You can if you store the correct camera values beforehand and do a comparison. However, there's no real reason to do so because it takes just as much time to get the camera status as to set it, so you are just making things worse by checking first.
 
Don't snap the camera (apply it over .02 seconds or something)

Ok thats helpful thanks.

You can if you store the correct camera values beforehand and do a comparison. However, there's no real reason to do so because it takes just as much time to get the camera status as to set it, so you are just making things worse by checking first.

Hmm that's logical. Will do.

Thanks ppl I can now get rid of this 'Lock Camera to unit' function. Cheers!
 
Status
Not open for further replies.
Back
Top