robotpencil's Forum Posts

  • Character Jitter when using lerp() on my Physics Sprite.

    Basically, it looks like this using the simple lerp function on set position: lerp(Self.X,Sprite.X,0.3) & lerp(Self.Y,Sprite.Y,0.3)

    I've tried messing with the 0.3 value, but nothing really works.

    See how it pops. And here is it when I just have the set position to Sprite.X, and Sprite.Y

    Smooth animations and framerate.

    And here it is with no camera move.

    Also smooth.

    Now I have achieved this same effect in this game I made using Playcanvas, but what I did was use simple math like finding the difference between the two points, then dividing it by a variable that controls the speed. For instance:

    (Self.X-Sprite.X)/thisSpeed[/code:8pgfygbc]
    
    Here is a game where I used a different code set up and used basic math functions to make it work.
    https://robotpencil.itch.io/telemega
    
    I've used it in other games I made and it works great. I just need to know if there are basic math functions I could use like +-*/
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads