• 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.

Camera Mechanics

Status
Not open for further replies.
So when venturing a 3rd person camera, I went to the point that I wanted to make AoA, Distance, and Height of unit adjustable at the same time. Custom buff and add/remove ability trick for enable/disable adjustments are too cumbersome. You have to enable them, then you would have to disable them. And they take up space in the UI.

So I wanted to make the AoA increase when the player scrolls up, and have no effect on the cam position. How would it be possible? Trackables?
 
There are a couple of ways to approach it. The way I thought of it was:

Lock position, distance, and rotation periodically, but don't lock angle of attack. This will allow you to use scrolling to change the angle of attack (because by default, scrolling will change the distance, rotation, and angle of attack).

Alternatively, you can always use arrow keys. Here is an example:
http://www.wc3c.net/showthread.php?t=104786
^That is my favorite camera system to use.
 
I meant that I wanted to change AoA when the mouse hits the four screen borders. Would trackables work here?

I've tried arrow keys, and as I said in the first post, it is too cumbersome for the player to use. He might die to monsters in-game trying to fix the angle and kill me in turn for making an un-user friendly cam system.
 
Oh, I didn't understand what you meant. I thought you wanted it to move with the scroll wheel. In which case, this is what it would be like:
http://www.hiveworkshop.com/forums/pastebin.php?id=qzgg9y
(it is just an example though, not an actual system. ignore the map name and the extra code in the trigger)

Technically you can use trackables, but it would take up a lot of memory and performance. See:
http://www.thehelper.net/threads/trackmapsystem.121858/
In theory, you could create that across your map and detect when a player hovers over a spot on the edge of the screen (not sure if it will fire when the scrolling cursor appears though). The "edge of the screen" would be detected through some calculations (map-specific, it depends on your camera), it would just be a certain distance from your unit.

There are a few issues though. (1) trackables are on terrain, so you obviously can't detect when a cursor is on the UI. This means that you can't detect a downward scroll very easily (2) trackables can't be removed (Blizzard didn't really create a proper API for trackables) (3) it is very messy and the players might accidentally trigger the scrolling when they are just moving their cursor around. I recommend that you look into a different option. In my opinion, using the scroll wheel is the best option (as shown in that pastebin map). Arrow keys would be next in line (slow in multiplayer though). Abilities would be next IMO, but they take up UI space (as you've said). Chat messages/dialogs next, they take time to adjust.

I mean, you can certainly do cool things with trackables, but they require some manipulation and are generally better for smaller maps. If you have a 256x256 map, having trackables everywhere would probably kill performance. Even if they are just simple planes/boxes (iirc). Since they can't be destroyed, they aren't very dynamic for camera systems.
 
Status
Not open for further replies.
Top