I would just use triggers personally. Something like timerCamera, set to .1 or .2 seconds. Have an event that fires every time timeCamera expires, which simply centers the camera to be directly on your hero unit or whatever over 0.0 seconds. If it is too jumpy, I would try playing with the 'over X.X seconds field'.
I'm not positive on this one, but there might even be a function to attach a camera to a unit. Heck, you can do it with points and regions, why not a camera?
What your probably noticing is the smoothing of the camera. For instance, I assume you already have the camera following the unit and whenever the unit moves the camera takes a half a second to start or stop following the unit. You need to edit some camera data to get rid of the smoothing values. There are just some camera settings/data which triggers cannot access or change.
In the data editor:
1) Open a new tab for cameras (its under 'Edit Advanced Data')
2) Select whichever camera your using and on the left window look for the field 'UI: Target Smooth'. *If not sure which camera you are using you can add a trigger at the start of your camera trigger which selects which camera data to use.
3) Expand it (double click the mouse or right click the mouse over it and select 'Expand All Fields').
4) Under the sub-fields for 'UI: Smooth Time Maximum' and 'UI: Smooth Time Minimum' change their values to zero.
Good to hear. I assume I understood your problem correctly? And sorry about the map. I forgot their was a mod being used. I was using another map and deleted everything but never thought about the mod.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
How can i lock a camera on a unit so the camera don't lag behind or minijump when the unit move around / changes directions?
@Sherlia: Go
I would just use triggers personally. Something like timerCamera, set to .1 or .2 seconds. Have an event that fires every time timeCamera expires, which simply centers the camera to be directly on your hero unit or whatever over 0.0 seconds. If it is too jumpy, I would try playing with the 'over X.X seconds field'.
I'm not positive on this one, but there might even be a function to attach a camera to a unit. Heck, you can do it with points and regions, why not a camera?
What your probably noticing is the smoothing of the camera. For instance, I assume you already have the camera following the unit and whenever the unit moves the camera takes a half a second to start or stop following the unit. You need to edit some camera data to get rid of the smoothing values. There are just some camera settings/data which triggers cannot access or change.
In the data editor:
1) Open a new tab for cameras (its under 'Edit Advanced Data')
2) Select whichever camera your using and on the left window look for the field 'UI: Target Smooth'. *If not sure which camera you are using you can add a trigger at the start of your camera trigger which selects which camera data to use.
3) Expand it (double click the mouse or right click the mouse over it and select 'Expand All Fields').
4) Under the sub-fields for 'UI: Smooth Time Maximum' and 'UI: Smooth Time Minimum' change their values to zero.
5) Save game and test by moving your unit around.
I've uploaded an example map.
@zandose: Go
The map require a mod i dont have so i cant open it :(
You had allot more info then needed on that map but i managed to got it to work perfect, thanks so much!
@Sherlia: Go
Good to hear. I assume I understood your problem correctly? And sorry about the map. I forgot their was a mod being used. I was using another map and deleted everything but never thought about the mod.