PlayerRig bounces back to a previous position on the timeline?

I posted a video with an explanation where I get stuck in lecture 113.
I recently found myself starting from scratch with the player rig trying to record. As I place the player rig to move across the scene. What is happening is the player rig/ship freezes and doesn’t allow me to move further than certain points at times in the scene. This happens over time as I start from scratch to set up the scene how the player rig will move across the scene. I get no error messages this just happens. I reinstalled Unity and even tried to downgrade versions to 2017 didn’t help any. Any feedback is appreciated, I hope someone can follow me :slight_smile:

1 Like

Hi,

Just as a suggestion, whilst the video is useful to show the issue, you could have typed up the issue for people to read, and then provided a much shorter video to demonstrate the issue.

Looking at the issue itself its a bit challenging to tell what the problem is, but one thing that struck me was this;

image

The timeline is usually displayed in either frames, or seconds - if yours is currently displayed in seconds then when you run your game you are not going to see the animation occur for two weeks.

As a test, clear all the keyframes you have on that timeline, and then get back to the start of the timeline, e.g. zero - add a few keyframes at a time and see if you experience the same issue with maybe 1 to 2 minutes worth of animation duration. If you don’t I would be wondering whether Unity is perhaps preventing you from recording anything further because of the amount of memory it would take to run your 14 days worth of animation.

The only way I can think that you could have even got that far along in the timeline would be if perhaps you had left it recording without realising and were working away in the scene moving things and it was perhaps recording those keyframes. Quite odd.

I could be entirely wrong here, but it’s almost impossible to tell from your video. Sorry.

Hi, Rob I truly apologize for not giving a short written description I added one if it will help you help me I will also recreate the video as well after making corrections toy suggested if it works or not. Thank you :slight_smile:

1 Like

Hi,

No need to apologise, the point I was making was really about getting you as much support as possible. People are generally lazy, so if they have to sit through 4 minutes of your video to see what the problem is without any clues they may not bother, which means you may not get a response from someone who may have just had exactly the same issue and found a solution! Gah, how frustrating would that be! :slight_smile:

Let me know what happens with regards to recording at the start of a clear timeline, e.g does the problem still occur. If it does and you can’t spot anything obvious I will be more than happy to take a look at your project for you and see if there is anything I can see, no guarantees but a second set of eyes on the problem can’t hurt… unless I have to watch 14 days of animation to see the issue :wink:

The forum will allow uploads of up to 10MB, if your project files (zipped) are larger than that you would need to use a service such as Google Drive or Dropbox, and then share the URL.

I’ll have a little bit of time tomorrow morning (UK) between some other tasks and will happily take a look should you want me to.

Hi Rob, I’m not understanding this portion you explained? can you give me a little more information on this you state ( If you don’t I would be wondering whether Unity is perhaps preventing you from recording anything further because of the amount of memory it would take to run your 14 days worth of animation.)
I followed your instructions and cleared the timeline started at seconds. did this several times but I still can’t move the player rig around.

Here is a video explaining what I’m going through: btw, does the amount of memory mean the amount of memory in my pc/ do I need to upgrade memory and Unity too?

Hi,

Sure, if you look at the values on the timeline (above the red recording area in your video), you’ll note that the values are at least in their 10s of thousands. The timeline is measured in either frames or seconds. In either case, you are recording a very long time into the future here. What I was suggesting is that perhaps there is a limit, and you have both met and maybe exceeded it. It is only a bit of a guess as I don’t have your project to hand to open and experience the issue first hand and try to resolve. I am not certain why you would want to record animation that far into the future, so I have to assume that perhaps you were not aware that you were.

After getting some sleep I do recall seeing a similar issue like this before, so it probably isn’t directly related to the position in the timeline, it’s been a little while since I looked at the Argon Assault project, could it be that the GameObject you grab in the scene isn’t the one that you have dragged in to create the animation for, e.g. its a child GameObject and perhaps when you try to move it the animation of the parent GameObject is snapping it back?

The only way I can help more really is to look at your project, happy to if you want to share it?

The forum will allow uploads of up to 10MB, if your project files (zipped) are larger than that you would need to use a service such as Google Drive or Dropbox, and then share the URL.


Updated Wed Dec 12 2018 10:33

I’ll open a copy of the project I have at this end and see if I can duplicate the behaviour you are experiencing. Another thought, looking at your video, you have the two keyframes at the start of your video and there is a blue line on the timeline between them, I’m wondering if this is indicating a selection, and then you are trying to move the ship within that recorded selection and the animation is effectively saying, “Nope, it should be here”.


Updated Wed Dec 12 2018 10:38

I’ve just looked at the Master Timeline in the copy of the project I have here, here’s a little screenshot;

Notice there is only one of these movement bars in my screenshot, your video indicates two… I have a feeling this is related to the problem. In your video you have Play Range Markers enabled;

image

In my screenshot above, I don’t. In your video I think you have these range marks indicating the start and end of the playback section together and on the far left;

image

As you move the other one in the video I think the animation is stuttering because it can only move within the range selected between those Play Range Markers.

Disable the Play Range Markers option and see if the issue goes away.

If not, please share the project and I’ll take a look for you :slight_smile:

Rob, Will check these settings and get back to you. Thank you

1 Like

No problem. Sorry its a bit all over the place, its very challenging to diagnose this type of issue remotely. After you’ve had a look if you’re still stuck provide me with a copy of the project and I’ll see if there’s anything I can see, lets see if we can get you moving forward again :slight_smile:

Hi Rob, I was able to get a working timeline for the player rig. I just, started from scratch and created a master timeline again that allowed me to reset all settings you discussed. But now I stuck with new (?) if you look at this new video my player movies through the game way to fast. I able to fly and stay within the game scene, very important to do this. My question, is do I need to start again and allow more second meaning time to fly between keys placed on the timeline? or the will be another way to reset the speed in the next lecture 114? Any feedback is appreciated :slight_smile:

Here is my video URL:

Hi,

Great news, in the process of doing so, were you able to determine what had caused the issue you were experiencing in the first instance? I note for example that you have the Player Ship selected in the Hierarchy now as opposed to the Player Rig, may not be related but should the problem occur again it might be good for you to know how you resolved it, without perhaps having to delete your timeline next time?

Regarding the speed, as mentioned it’s been a while since I looked at this section of the course, I do recall at one point Rick selects all of the keyframe on the time line together and then moves them apart a bit - in doing so he effectively slows down the speed at which the player (camera) is moving around the scene. I don’t recall anything else after this which controls the actual speed of the camera movement. The values in the Inspector, exposed via the PlayerController.cs are purely for the control you have in moving the ship horizontally/vertically, but the speed at which the player (camera) is moved around the rail is controlled via that animation track.

You want to slow it down, insert more time between the keyframes, if you want to speed it up, or a specific part of it, move them closer together. In the first instance I would suggest doing what Rick did, select all of the keyframes and then move them apart, then run the game and note the difference in speed. If its still too fast, repeat, if its to slow, select them all again and move them a little closer together.

Once you get a base-line for the speed you want the player to progress through the scene, you could then potentially override this via code, this could be useful if you want to add power-ups, or speed boosts, afterburners or airbreaks etc. This isn’t covered in this section of the course, nor is the looping. I’m not entirely certain whether this was a bit of an oversight, or deliberate, e.g. by this point in the course you should be able to think about about how your level will end (or not), some examples of that thought;

  • you could continuously loop the player around the one level, respawn the enemies, but sooner or later that’s going to get really boring.
  • you could advance the player to the next level once they’ve moved around the scene for the duration of the animation, but unles you’ve got a decent amount of animation this could end to quick
  • you could keep looping the player around the scene until they have destroyed all of the enemies

For the looping take a look at the Wrap Mode on the PlayableDirector component. Some links below for you too.

Hope this helps :slight_smile:


See also;

I commend you and thank you for your guidance, I will work on the speed I thought I had to adjust in this manner :slight_smile:

1 Like

You’re very welcome Martin, happy to help :slight_smile:

Privacy & Terms