Argon Assault - Timeline difficulties: How to keep constant speed?

Hello,

I’m doing the 3D Unity course, I’m currently working on the Argon Assault game.
I’m struggling to move the space ship forward at a constant speed in the timeline. Any tips ?

I’m noob, please be nice.

Thanks in advance!

Hi Pedro,

Welcome to our community! :slight_smile:

The keyframes define what position the spaceship is supposed to have at that timestamp. The animation interpolates between the position values of two keyframes.

A quixotic real life example:

  1. The supermarket is 20 m away from your current position.
  2. New York is 10,000 km away from your current position.
  3. It is 8 a.m. now.
  4. You are supposed to be at the supermarket at 8:05 a.m. (same day).
  5. You are supposed to be in New York at 8:10 a.m. (same day).

How fast do you have to travel to reach both the supermarket and New York according to your schedule? (Of course, that’s a rhetoric question.)

You’ll have to run really fast if you want to travel 10,000 km in 5 minutes.

The same happens in your animation. The spaceship needs more time to reach the next position. That will allow it to move at slower speed. If the spaceship is too fast, move the keyframe to the right. If the spaceship is too slow, move the keyframe to the left.

Also please feel free to ask our helpful community of students for further advice over on our Discord chat server.

I hope this helped. :slight_smile:


See also:

Hi there.

Thanks for your reply.

I understand that.
I have hundreds of keyframes in the timeline, it’s very hard to space all of them in away that creates a smooth and constant speed, sometimes the speed changes dramatically which is very odd.
I wonder if there is some technique to space the keyframes in the timeline so the speed remains constant, otherwise I will have to move each keyframe and check over and over again if the speed “feels” constant. There must be a way to do this, feels so archaic adjusting keyframes manually.

I asked our team but, unfortunately, nobody knows a simple solution. The problem you encountered in Unity’s animation system seems to be a general problem in lots of programs.

Maybe, if you do some research, you will be able to find some algorithm on GitHub which adjusts the positions of the keyframes to make the speed constant.

The best would be to also ask in our chat. Maybe somebody knows a better solution.

Hello,

Thanks for your reply.

So far the only way I found to measure how much I’m moving per second is to look at the grid, so I try to move always the same amount of squares per second. It’s tedious, rail shooters will never be my thing I guess :sweat_smile:

Gary found a potential solution for the waypoint problem. However, it’s not a solution for the animation. We also don’t know if it still works but if you just need waypoints, not any fancy animation, you could test it.

Thank you for providing a possible solution. However I must say that’s a bit over my head and out of my scope. I just moved to others topics that are more of my interest. Thank you for your time.

Privacy & Terms