playMaker

Author Topic: Jumping within camera  (Read 1187 times)

Seiryu33

  • Full Member
  • ***
  • Posts: 133
Jumping within camera
« on: April 08, 2019, 12:58:11 AM »
I might've asked before, but how do you make a 2d character jump within the camera but still follow the character? I can make things like the status bar follow the character and then parent the camera to the status bar but not totally sure beyond that.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Jumping within camera
« Reply #1 on: April 09, 2019, 08:16:41 AM »
I usually have a Camera Holder (empty parent) and in there i have a vertical holder (empty child)

and in there i have my camera.



Then i use 2 smooth follow action to follow the player :



The vertical holder is actually for some events that need some effects, so it might not be needed for you.

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Jumping within camera
« Reply #2 on: April 09, 2019, 12:14:34 PM »
Use the CineMachine package (free addon for Unity) for this, and follow the instructions explained here to get a good start.


Install CineMachine and configure it, see video. CineMachine allow to follow an object with nice controls. Now add a game object to the player under the holder object, and instead of following the player character directly, follow a new empty game object under the holder, call it e.g. “focus”. Once you got the basics ironed out, you can use Playmaker to slightly adjust the focus, e.g. offset it when jumping. But I advice to do this only as the last step, rely mostly on CineMachine.

Seiryu33

  • Full Member
  • ***
  • Posts: 133
Re: Jumping within camera
« Reply #3 on: May 06, 2019, 09:37:45 PM »
Maybe I'm missing it but Smooth Follow Object doesn't appear to be in my action list. Wasn't in the most recent update of Playmaker either. I have the smooth follow actions but none really worked. They kept messing up the camera position either flipping it or rotating it.
« Last Edit: May 06, 2019, 09:41:26 PM by Seiryu33 »