Author Topic: Camera: Smooth Follow Action + Distance Damping?  (Read 2716 times)


  • Sr. Member
  • ****
  • Posts: 480
Camera: Smooth Follow Action + Distance Damping?
« on: September 17, 2017, 11:50:21 AM »

I struggle somewhat to get a more advanced camera going, that needs to change how fast and loose it follows the player (I want this based on distance, but possibly also on other parameters). Smooth Follow Action works fine, but it always snaps into place.

I tried also the following: I created a game object, called Shadow which uses Position Smooth Damp. I get the distance to player, substract that from a value and feed this as the smooth time. In other words, the greater the distance, the faster it will follow. The shadow now follows the player in a rubberband-like manner. The further away you go, the faster it will try to catch up.

I set the camera to Smooth Follow Action, and another time also as a simple child (for the offset) of this Shadow object, rather than the player directly, which gets me somewhere near what I want. The problem is that this creates the typical Non-FixedUpdate jitter, in whatever variant I tried.

Maybe there are other ways to get what I want which is: divide the screen into three parts vertically, A|B|C. When the player is within B (the middle section), the camera is supposed to relax and move slowly. When the player moves towards either A or C (towards some threshold, A|B or B|C) the camera must speed up and basically lock onto the player as long as they run in this direction. Ideally, it's possible to "lock" into the player and release gradually by float.

If you have any idea how I can build this, or any pointer what I could try, I'd greatly appreciate it.
« Last Edit: September 17, 2017, 02:38:36 PM by Thore »


  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: Camera: Smooth Follow Action + Distance Damping?
« Reply #1 on: October 17, 2017, 02:59:53 AM »

 CineMachine would likely give you tremendous power without any code at all, have you experimented with it already?




  • Sr. Member
  • ****
  • Posts: 480
Re: Camera: Smooth Follow Action + Distance Damping?
« Reply #2 on: October 17, 2017, 03:02:16 PM »
Didn’t know about it, looks fantastic (also that it is free now). I‘ll check it out. Thanks!