Vision through units eyes

Status
Not open for further replies.
Is their a trigger to where it changes the players vision to come out as if from a certain units eyes? If so what is it?
That is impossible...
Firstly units have no eyes, they have mesh and meterial to look like eyes but mechanically they are no different than any other surface and mesh on the model. Secondly how can a monocular camera like that which WC3 uses by default support binocular vision like that of most units in the game "appear" to have...
You clearly did not think this through very well...

You can however try moving the camera to a position that appears to be some what like the unit would be seeing if it was real but avoid colliding the camera into models as the result is unrealistic and ugly (yes, all models in computer games are voids of space and often only textured if viewed from the outside).
 
That is impossible...
Firstly units have no eyes, they have mesh and meterial to look like eyes but mechanically they are no different than any other surface and mesh on the model. Secondly how can a monocular camera like that which WC3 uses by default support binocular vision like that of most units in the game "appear" to have...
You clearly did not think this through very well...

Are you serious?
This is such a dumb answer...
He doesnt want to have a binocular cam, just the vision of the unit.
If he asks such a question you should know he just wants something simple and doesnt know how it works/if its easy possible.

and Dark_Axl allready suggested the 2nd part of ur answer.
 
This is what I did for one of my maps. First thing though, you have to make a camera with the kind of view you want, but just for an example ill give you what I used.

HeroCam
Camera Values:
Target X: 2623.64
Target Y: 2625.25
Z Offset: 150
Rotation: 90
Angle of Attack (AoA): 340
Distance: 350
Roll: 0
Field of View (FoV): 70
Far Clipping (FarZ): 50000


Next you will have to trigger with something like this...

  • Player 1 HeroCam
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Camera - Apply HeroCam <gen> for Player 1 (Red) over 0.00 seconds
      • Camera - Lock camera target for Player 1 (Red) to SaveLoadPlayerHeroSingle[(Player number of (Triggering player))], offset by (0.00, 0.00) using Default rotation
      • Camera - Set Player 1 (Red)'s camera Rotation to (Facing of (Random unit from (Units owned by Player 1 (Red)))) over 0.00 seconds
This is just what I used and doesn't mean it will work. This does not need any variables and will not be like a First Person Shooter camera, this is a 3rd person camera
 
  • Player 1 HeroCam
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Camera - Apply HeroCam <gen> for Player 1 (Red) over 0.00 seconds
      • Camera - Lock camera target for Player 1 (Red) to SaveLoadPlayerHeroSingle[(Player number of (Triggering player))], offset by (0.00, 0.00) using Default rotation
      • Camera - Set Player 1 (Red)'s camera Rotation to (Facing of (Random unit from (Units owned by Player 1 (Red)))) over 0.00 seconds
This is just what I used and doesn't mean it will work. This does not need any variables and will not be like a First Person Shooter camera, this is a 3rd person camera

does it work perfectly? because i can't find which player is referenced by the "Triggering Player".
or does it automatically references to the Player 1?
 
does it work perfectly? because i can't find which player is referenced by the "Triggering Player".
or does it automatically references to the Player 1?

This trigger is automatically referencing player 1 because I had (for my map) separate triggers for each player. You can change it though with a playergroup like this.

  • Player Group HeroCam
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Apply HeroCam <gen> for (Picked player) over 0.00 seconds
          • Camera - Lock camera target for (Picked player) to Your_Hero[(Player number of (Picked player))], offset by (0.00, 0.00) using Default rotation
          • Camera - Set (Picked player)'s camera Rotation to (Facing of (Random unit from (Units owned by (Picked player)))) over 0.00 seconds
If you don't want a 3rd person cam, use this tutorial for first person. https://www.hiveworkshop.com/forums...rials-279/creating-first-person-camera-93891/
 
Last edited:
Status
Not open for further replies.
Back
Top