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

[Trigger] First person camera....

Status
Not open for further replies.

Deleted member 177737

D

Deleted member 177737

Hey,

I'm working on a first person camera to go with my arrow key system but it keeps doing this weird glitch where it sort of stutters when turning the character, and when the character runs forward it does this extremely strange glitch where the character's upper body begins to merge with the view in front of the character.
I've attached the map (because you might need my other triggers to solve this) and a picture of the front view glitch.

The triggers you will need to probably have a look at are "Apply Camera" and "Keep Facing" they are both located in the "Arrow Key Movement" folder.

+rep
 

Attachments

  • wtf.jpg
    wtf.jpg
    465.1 KB · Views: 111
  • Nelf.w3x
    725.4 KB · Views: 88

Deleted member 177737

D

Deleted member 177737

I tried using the ones in the spell section but they never work the way I want them to, and the only one that even came close was in jass (I hate jass so I didn't use it.).

Just need to fix the camera, the arrow keys work like I want them to though.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
  • Apply Camera
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Camera - Set Player 1 (Red)'s camera Distance to target to 150.00 over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Angle of attack to 350.00 over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Rotation to (Facing of MovingUnit[1]) over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Height Offset to 100.00 over 0.00 seconds
      • Set tempLoc = (Position of MovingUnit[1])
      • Camera - Pan camera for Player 1 (Red) to tempLoc offset by 50.00 towards (Facing of MovingUnit[1]) degrees) over 0.00 seconds
      • Camera - Lock camera target for Player 1 (Red) to MovingUnit[1], offset by (0.00, 0.00) using Default rotation
      • Custom script: call RemoveLocation(udg_tempLoc)
  • Keep Facing
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Camera - Set Player 1 (Red)'s camera Distance to target to 150.00 over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Angle of attack to 350.00 over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Rotation to (Facing of MovingUnit[1]) over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Height Offset to 100.00 over 0.00 seconds
1) Locking the camera is WAY better than moving it every 0.10 seconds.
2) Every 0.03 seconds is too fast for the eye, so it will seem smooth (0.10 seconds stutters).
3) Leak removed.
4) Distance to target over 150 and the camera won't go inside the model.

Also, if this map is for multiplayer: forget about the entire arrow key thing. It just doesn't work in multiplayer (at least not smoothly).

Pharaoh is right about the triggers though...
 

Deleted member 177737

D

Deleted member 177737

  • Apply Camera
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Camera - Set Player 1 (Red)'s camera Distance to target to 150.00 over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Angle of attack to 350.00 over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Rotation to (Facing of MovingUnit[1]) over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Height Offset to 100.00 over 0.00 seconds
      • Set tempLoc = (Position of MovingUnit[1])
      • Camera - Pan camera for Player 1 (Red) to tempLoc offset by 50.00 towards (Facing of MovingUnit[1]) degrees) over 0.00 seconds
      • Camera - Lock camera target for Player 1 (Red) to MovingUnit[1], offset by (0.00, 0.00) using Default rotation
      • Custom script: call RemoveLocation(udg_tempLoc)
  • Keep Facing
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Camera - Set Player 1 (Red)'s camera Distance to target to 150.00 over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Angle of attack to 350.00 over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Rotation to (Facing of MovingUnit[1]) over 0.00 seconds
      • Camera - Set Player 1 (Red)'s camera Height Offset to 100.00 over 0.00 seconds
1) Locking the camera is WAY better than moving it every 0.10 seconds.
2) Every 0.03 seconds is too fast for the eye, so it will seem smooth (0.10 seconds stutters).
3) Leak removed.
4) Distance to target over 150 and the camera won't go inside the model.

Also, if this map is for multiplayer: forget about the entire arrow key thing. It just doesn't work in multiplayer (at least not smoothly).

Pharaoh is right about the triggers though...

I just changed my triggers to look like the ones that you've shown above, but the camera ends up in a very weird area (picture attached). This glitch has happened to me whenever I tried to change the settings, no idea why though... Its like the game hates my triggers =P

I've also attached a picture of the triggers.

Also, the map isn't for multiplayer. It is just a little project I'm working on for a bit. I know the triggers are like "WTF is this?!?" but its the best I can do with barley knowing how to make it. It works well for me though and thats all I need it to do.




IMPORTANT EDIT:

I just messed around with the triggers again in an attempt to fix the problem myself again... I figured out that using either of the lock camera actions bugs out the camera so it becomes slanted and far off like in the picture below.
I also managed to screw around with ap0calypse's trigger and get some of his trigger to work.

At the moment the trigger is back to leaking (yeah I know my triggering is bad...) but I have managed to get it to stay behind the unit (I wanted the camera to basically be a bit in front of the units face though.
Well it it good enough for a patch job, but a solution is still needed.

*ap0calypse's trigger probably works, just means I messed something up =/
 

Attachments

  • One.png
    One.png
    1.1 MB · Views: 148
  • Two.png
    Two.png
    146.8 KB · Views: 218
  • Three.png
    Three.png
    125.4 KB · Views: 116
Last edited by a moderator:

Deleted member 177737

D

Deleted member 177737

try to see my camera system in the spell's section, it has an option to view first person camera, plus its MPI...

Thanks for the sugg, but I can't use jass at all =/
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Ahahh, you used "Lock camera orientation, Yayoi. That's not what I did ;)
I changed the trigger to "Lock camera target" (and it worked perfectly in my test).

Would you try re-creating my triggers, but with camera target now? I hope it helps (it did for me :S).

Edit: Oh, and yes: it's a point variable :) the GUI names of the variable types are pretty stupid (location = point / force = player group / group = unit group).
 

Deleted member 177737

D

Deleted member 177737

=P guess that one little error messed it all up. Thanks for all the help.
 
Status
Not open for further replies.
Top