0
Answered

Smooth movement

Alessandro 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 2

Hello!

I'm trying to understand what am I doing wrong in the diagram below.

I was expecting a smooth enemy movement along the x axis, seems simple enough, but the movement seems to be a little laggy as opposed to the smooth player movement.

See coins, parrots and missile in the video.


Notes:

  • I'm using fixed update as I have many elements that need pausing so I set the time to 0 for pause, but I tried with update and it doesn't make a noticeable difference.
  • I tried to replace Get fixed delta time, with get smooth delta time, no improvements



Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
GOOD, I'M SATISFIED

Thanks to both of you guys!

Satisfaction mark by Alessandro 2 years ago

This graph should work correctly. Maybe try to work with rigidbody force or speed maybe? and then break the vector (x,y,z) and give this value to x axis. I can't see the video so idk the error exactly but I hope this help you.

+1
Answered

You shouldn't be using Transform methods if your objects are Rigidbodies: you can either use Add Force or Set Velocity on the rigidbody for the Unity physics system to work properly. You should have a look at the Platformer Tutorial (http://ludiq.io/bolt/tutorials) to see how it's done there, it's a good example!