HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Players' camera targets

10-25-2004, 05:59 PM#1
th15
Quick query, does anyone know how to retrieve the target point of a specific player's camera?

I'm just trying to get a certain player to view exactly what another player is looking at with the camera. Does anyone know of any way at all?

Following units that a 'master' player selects won't work because you'll often select units off-screen with hotkeys. Perhaps I could make the 'slave' player's camera follow where the 'master' player issues order targets? But you can issue orders to units off-screen and with the minimap so that isn't the best either.
10-26-2004, 08:54 AM#2
Guest
Camera information isn't synched... you will notice that the `current camera bounds' function when you select a region in the GUI does not differentiate between players... :-\

However, there is a script on wc3sear.ch that synchs stuff like camera information... by the author's admission, tho, it's not that fast, so it might be too laggy for your needs.

What about having the `master' control an owl or sth? Or anything else that's synched.
10-26-2004, 05:13 PM#3
th15
Hmm okay, how about checking if a point is within a player's current field of view? Is that possible?
10-26-2004, 11:49 PM#4
Guest
Hey, I don't know if this is a good idea or one that suits your needs, but how about this:

Make an invisible unit and lock the player's (or each player's) camera to their unit. Then when they want to move to camera, they have to use the arrow keys, and you pick that up with triggers, and you move the unit, so you can see where the unit is in relation to whatever you want them to (or not to) look at!! :god_help_us:
10-27-2004, 12:21 AM#5
Guest
(/me seconds alcoholic's idea)

If you try to do any non-local actions depending on sth like a local camera event or checking camera bounds for whether or not to perform an action, different players' computers will give different results, causing desynch...?

You could check if a point is within camera bounds, but it will always use the local player's camera bounds.
10-27-2004, 01:07 AM#6
Gandalf2349
pity warcraft was programmed by people who generally had single player in mind.

expanding on alchaholics Idea, you would lock their camera to a camera object and move the camera object instead. But still, that's not very clean.
10-28-2004, 02:32 AM#7
Guest
No, I don't think it's because of programming oversights... more like, imagine the lag you would get if cameras were synchronized and someone clicked and held on the minimap and started waving their camera location around. >.<

(since it would be a continuous input instead of discrete inputs like unit commands)
10-28-2004, 09:47 AM#8
th15
Quote:
Originally Posted by misaki
(/me seconds alcoholic's idea)
You could check if a point is within camera bounds, but it will always use the local player's camera bounds.

Could you elaborate on this? I've never used the camera triggers very much and I would go with this if synching cameras isn't possible.
10-29-2004, 07:58 AM#9
Guest
Meh... it's a simple boolean condition: is <point> inside of <region>, where <region> is the rct (I think it's a rct...) returned by the GetCurrentCameraBounds or w/e function.

Do you mean alcoholic's idea?