Create a Smooth (and delayed) Follow Camera: HOW?

  • For many reasons it's desirable to have a camera that doesn't respond exactly as the character does.

    Is there a way to achieve this kind of lerping in hyperPad:

    Using maths, and/or physics objects partially or representatively associated with the hero character, I've created some interesting follow cameras. But due to the lack of a tick and/or game loop with specific scheduling, (or lateUpdate or fixedUpdate), there's a lot of spasmodic jumping and stuttering going on, regardless of what I set the timer value to. I've tried 1/30th, 1/60th, 1/120th and 1/240th of a second. All have the same sorts of stuttering, at differing rates.

    I've tried artificially smoothing through damping a joint to the physics body, using "look at" and "move to" type physics observation and forces and air resistance. Nothing creates a smooth follow camera.

    My hero character can reverse very quickly, and jumps with a good deal of force, bounces significantly off objects and walls, and lands very hard. So the follow camera mechanism needs to deal with this type of highly dynamic hero.

  • @Deeeds weird, I just tested it and get position seems to be slightly broken for moving objects. Simply moving the screen to the player's position on a timer(0) doesn't look right, even though screen to object works fine on a timer(0). @administrators, bug? (Link to project with bug:

  • @Jack8680 What does timer(0) do?

    I'm assuming every frame, but what if I have my physics set to calculate every 120th or 240th of a second? Does timer(0) know anything about my physics settings?

  • @Deeeds Timer(0) is always 60 repeats per second. The only exception is lag obviously.

  • @Aidan-Oxley Sorry, I'm not a maths champ. What does "yo" mean?

  • @Deeeds It means I am not good at using iOS 11 keyboard. Edited to fix it lol.

  • @Aidan-Oxley Cheers. I thought I was about to have to learn a whole new math abbreviation lexicon. Very thankful I don't.

  • @Deeeds yeah, it's 60 times per second. It doesn't adjust with your physics speed, but the maximum fps is 60 so you won't need any faster for screen moving.

Log in to reply

Looks like your connection to hyperPad Forum was lost, please wait while we try to reconnect.