| 02-11-2005, 02:26 AM | #1 |
I'm trying to get the camera to lock on a unit, which is the easy part, the hard part is I want the camera to look like your looking through the units eyes. So I want the camera to placed just infront of the units face and also to make the camera move with the unit, so like when the unit is facing 56 degrees the camera has to be facing 56 degrees also. How would I go about this? Also it would be great if you could put this on a map and post it here! |
| 02-11-2005, 03:40 AM | #2 |
I have lots of maps with this but the camera part may be too troublesome to find. Anyway, it's quite simple. 1) - Set camera's rotation to facing angle of triggering unit (it's under Camera- Set camera field) 2) - Set camera's angle of attack to something like 350 or so (so it looks straight). 3) - Set Camera's distance to target to something. Now you're moving the camera back and up by a little 4) - Pan camera to position of (unit you want to look through) offset by (distance) towards facing angle of (unit you want to look through). Since you pushed the camera back away from the unit, you have to push it back forward, but this time without pushing it down. |
| 02-11-2005, 07:46 AM | #3 |
Wow Ant, I luv you! you have helped me so much! thank you so much your name is going to be all over my map! ps. I luv you in a non homesexaul way! If I could give more rep. I would! ![]() |
| 02-11-2005, 09:52 AM | #4 |
Guest | What Ant said is ok, but won't work very well; there's something missing. When you lock the camera to the unit, you are actually locking it to the origin of the unit; this means, once you set the angle and distance to target, you're going to see the unit legs or a feet sight instead of an eyes sight. To fix this, you have to change the field named "Z Distance" or something like that (I have spanish version, don't know the english one). Second, you don't need to set camera rotation to facing angle of unit, and you don't need as well panning the camera to the position of unit like Ant said. You only have to use the action "Camera - Lock camera to (unit) using (unit rotation)". That will lock to the origin of unit and automatically rotate camera like the unit. Salutions® |
| 02-11-2005, 10:31 AM | #5 |
When you set distance to target, you're moving it away from the origin including the angle of attack, when you pan it, you pan it without including angle of attack, so basically what I did was to raise the height by pushing the camera back with the angle of attack included, then push it back by panning the camera. Attached is the map with 3 different methods. I ripped it straight off a map I dumped so some variables may be unneccessary (like I believe FaceMod was so you could look to your sides while moving forward). the 1st method that is enabled already includes the height offset Only for going up and down cliffs (I didn't bother triggering the height changes finely. Ack). The 2nd method is without the cliff detection, rather the same thing. The 3rd method is without setting rotation and following Camera lock target to unit using the unit's rotation. Somehow my worldeditor doesn't like it to work. I have no idea, maybe I screwed up somewhere. |
