Camera follow lags behind unit...

Level 14
Joined
Aug 30, 2004
Messages
909
I want to lock my camera to the car in my map. The only action I found that can do that is this:

Camera - Follow for player 1 (Unit group(Car)) with the camera and Clear Current Target

The problem with this action, however, is that it lags behind the unit when it starts moving at high speeds. So a car moving quickly will not be able to see what's in front of it but can see plenty behind it. It just seems like the camera lags a bit behind the unit.

Is there any way to get the camera to look ahead of the unit but keep a bird's eye view?


EDIT:

I've tried a loop with:

  • Camera - Pan the camera for player 1 to (Position of Car) over 0.0625 seconds with 100% initial velocity, 0% deceleration, and Do Not use smart panning
But it ends up being choppy. I tried doing it over 0.0 seconds and that was even worse. I also tried a slower repeating trigger, every .25 seconds. That made it look a little smoother when running in a straight line, but when I turned it got really discombobulated.
 
Last edited:
Level 14
Joined
Aug 30, 2004
Messages
909
It definitely makes it better to have velocity at 100% and deacceleration at 0%, but it's still much choppy than the "lock camera to unit group" action.

Here is my map with the repeat trigger moving the camera:

http://www.hiveworkshop.com/forums/pastebin_data/w7jt20/_files/autodual 15.SC2Map

Here's the same map with the "lock camera" action:

http://www.hiveworkshop.com/forums/pastebin_data/w7jt20/_files/autodual 14.SC2Map

To test them, just press and hold W until the car is moving at top speed. Try not to drive due south as the zerg might kill you.... (right-click to turn)

You'll see at top speeds that it gets very choppy in the first version. In the second version it's less choppy, but you'll drive right away from the camera bounds.


EDIT:

I think the problem might have to do with this line I found in the Data Editor under Default Camera:

Field Default Camera Follow Scroll Limit 2.0000

The tooltip is: the maximum speed a camera will move when following a unit

I think I need to crank that up because the car probably goes faster than 2. I put it to 6.0000, but when I did this the default camera immediately duplicated. I can't seem to find out how to use the duplicated default camera either. It doesn't appear in:
  • Camera - Set No Game Link as the active camera data for (All players)
as one of the options.

EDIT 2:

I did figure out how to duplicate a camera and use it in the map. However, none of those variables that I changed made any difference to this particular problem.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 62
Joined
Jan 18, 2005
Messages
27,043
The trigger moved camera appears jumpy due to differences in blend algorthim between the camera and the unit.

The other is because you are using a group folow native. However, using the proper follow unit native seems to cause the camera to ossilate in a potentially dangerous (for ones eyes) way.
 
Level 14
Joined
Aug 30, 2004
Messages
909
The trigger moved camera appears jumpy due to differences in blend algorthim between the camera and the unit.

I'm not sure what this means or how to fix it. Is there something I can do about it?

I've looked around on the internet for people with this problem, and some suggested using an invisible observer and putting it in the group that the camera locks onto. Then I can move the observer ahead of the target unit. I haven't done that yet, but it's the only idea I have so far.
 

Dr Super Good

Spell Reviewer
Level 62
Joined
Jan 18, 2005
Messages
27,043
I'm not sure what this means or how to fix it. Is there something I can do about it?

It would help to further understand the problem.

A simple way to do this would be to see exactly where the blending goes wrong. Create a unit and get it to blend across the map towards a point (every game frame you blend it a bit towards the target point linearly). The camera you get to blend over the predicted time (for the unit to reach the end) from where the unit starts to the end point.

This lets you test exactly how they behave. The camera will be using a constant speed thus if the unit is shaking it must be a fault introduced with the unit blend. Further more, if that is the case locking the camera to the unit will make the terrain appear to shake.
 
Top