| 08-19-2005, 03:42 AM | #1 |
A few things first: 1. Sorry about making another thread so soon. 2. I have searched the forums, though all of the posts are old or referance unavailable maps. Anyways, I want to make a first person view, so here's what I have so far: I will have another trigger that will run this one: Actions- Camera - Set Player 1 (Red)'s camera Distance to target to 1200.00 over 0.00 seconds Camera - Set Player 1 (Red)'s camera Angle of attack to 345.00 over 0.00 seconds Camera - Set Player 1 (Red)'s camera Field of view to 20.00 over 0.00 seconds Camera - Lock camera target for Player 1 (Red) to MovingUnit, offset by (0.00, 0.00) using Default rotation Camera - Change camera smoothing factor to 1000.00 Trigger - Turn on LockCamera <gen> The second trigger (LockCamera): Events- Time - Every 0.01 seconds of game time Actions- Camera - Set Player 1 (Red)'s camera Rotation to (Facing of MovingUnit) over 0.00 seconds Camera - Lock camera target for Player 1 (Red) to MovingUnit, offset by (15.00, 15.00) using Default rotation This trigger does follow the unit, but for some reason, it does not put the camera in a first person view. Do I need to tweak some of those variables? Am I doing something wrong? Help is appreciated. Thanks |
| 08-19-2005, 10:09 AM | #2 |
Distance to target... you want the camera to be in the unit, so it should be 0 Angle of attack... you want the view to be horizontal, so it should be 0 Field of view... in first person shooters, this value is usually around 90 Rotation... the camera should be rotated in the same direction that the unit is facing Height Offset... this should be at the height of the unit's eyes, I guess around 100 |
| 08-19-2005, 07:40 PM | #3 |
I tried that, and it's very close. The only problem is that it isn't quite close enough (the settings you put down put the camera right behind the model instead of slightly in front of it). So at the moment, you can see the unit that the camera is following. Anyone have any other ideas to do this? |
| 08-19-2005, 10:31 PM | #4 |
You can try if by any chance a negative distance to target works, if not, then you must have an invisible dummy unit that's always moved in front of your unit to lock the camera onto. |
| 08-20-2005, 01:21 AM | #5 |
I did try a negative distance, and that did not work. As for an invisible dummy unit, that won't work for my situation. Anyone else? |
| 08-22-2005, 10:39 PM | #6 |
Bump |
| 08-23-2005, 01:55 AM | #7 | |
In my FPS Mod I'm using setting more like: Quote:
Thats for the First Person view, however you have to bear in mind, with my mod, I display an arm/hand model holding a gun as well, so these values might not be quite right for your needs. |
| 08-24-2005, 11:00 PM | #8 |
What I need is for the camera to be exactly where the unit is, not slightly behind it. Thanks though. |
| 08-25-2005, 06:33 AM | #9 |
Here's a little trick I use: -instead of locking the camera to a specific target, add a "pan camera with interpolated height over .01 seconds" to that specific target instead, and put it in your constant repeating trigger -make the camera pan to your target with a polar offset by [desired distance] towards that unit's facing angle If you pick your variables just right, you can actually make it be one pixel in front of the unit your following, so basically, first person perspective |
| 08-25-2005, 02:26 PM | #10 |
Can't you just change the focus to forward of the unit like this... Camera - Lock camera target for Player 1 (Red) to MovingUnit, offset by (0.00, 0.00) using (unit facing) Then ... I forget the exact trig(been a while) change the 0.00's to something like "sin(unit facing)*20". Like I said I forget the trig, but that should work if you know the correct code. What it would do is find the angle of the unit and the sin of the angle, and multiply that by 20. That would give the offset, hopefully infront of the unit's position. Maybe use cos, or tan. Someone knows what I'm saying, it's simple trig. |
| 08-25-2005, 02:32 PM | #11 |
Sorry I forgot that I locked my camera to the hand and not the physical unit. |
| 08-26-2005, 01:39 AM | #12 | |
Quote:
Once again, this method didn't work. It had some wierd results for me, especially when I hit the middle mouse button (scrolling up/down). Do you know how the creators of "Doom3" (Warcraft 3 version of course), did their first person camera? |
| 08-26-2005, 01:40 PM | #13 |
All else fails make a model-less dummy infront of your unit and lock the camera to that. |
| 08-26-2005, 07:01 PM | #14 | |
Quote:
As I said before, for what I'm doing, that will not work. |
| 08-26-2005, 09:01 PM | #15 |
I dont understand why it wont. Every .05 seconds move the unit instantly 40 away from the MovingUnit to Facing Degrees of MovingUnit. If the unit is Flying it wont colide with walls etc. |
