playMaker

Author Topic: Jumping within camera  (Read 217 times)

Seiryu33

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Jumping within camera
« on: April 07, 2019, 09:58:11 PM »
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: 4373
    • View Profile
    • jinxtergames
Re: Jumping within camera
« Reply #1 on: April 09, 2019, 05: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.
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

Thore

  • Sr. Member
  • ****
  • Posts: 277
    • View Profile
Re: Jumping within camera
« Reply #2 on: April 09, 2019, 09:14:34 AM »
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: 104
    • View Profile
Re: Jumping within camera
« Reply #3 on: May 06, 2019, 06: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, 06:41:26 PM by Seiryu33 »