[SOLVED] Animations are a little bugged in my project

When holding down W for a second or longer the animation just loops instead of stopping and if i tap it, it doesn’t stop like it usually did, it plays out the animation then stops. The same happens for every other animation i have added on my player.

Hi @Ehsaan_Khan,

Could you please share your code for this? It’ll help a lot in figuring out the problem.

i’ll share my project cause idk if it’s in the code https://playcanvas.com/editor/scene/1220171

Hey @Ehsaan_Khan, that’s quite a large project, but by the looks of it you’re not detecting the key up event and acting accordingly. Please do check out this animation tutorial on how you should handle animation blending, including how to check when the key is released.

Let’s just pretend im not a playcanvas expert and pretend im fairly new to playcanvas and explain how one does that?

Just go to the animation and don’t allow loops

i disallowed loops and it messed it further and the thing is this anim state graph is from the third person tutorial and it was working fine for a long time until something messed up thats when they released a patch note or something not quite sure what it is but it was said to have fixed the animations and it did but it had a new problem.


Study this part of the code carefully. Note how keyUp works.

I checked your project and the problem is caused because you use a second anim state graph with the same name. In the anim state graph that you use on your player, the speed for the forward animation is set to 4 which makes the animation look different than you expect.

image

@Gavin_Durbin i unlooped them all and it doesnt work i think i need to allow loops and @Albertos i completely removed both and added the one from the tutorial and it’s stil bugged and if i unloop them as Gavin suggested it’ll get messed more.

the animation i added “Run” was the thing that was bugging out but before a patch release or something it worked fine and the running animation was taken from Mixamo.com the very same site the other animations were taken from but i still wanna use different animations i dont understand why one animation doesn’t work but the rest do

It seems to work fine now, so what is the problem exactly?

i want to use a running animation and it’s from the same site as the other animations are from but it doesn’t work

If i add my own animation it bugs completely i even changed the name in the anim state graph yet to no avail

So the current project does not show the problem? If that is the case, please share a project that shows the problem.

Can we text in the chat in the projectit’ll be easier

No, we can’t text in chat because only team members can chat.

I see you replaced the animation now. It looks like the animation does not stay in place and moves forward by itself. I think you have to check the animation.

Oh ok i’ll add you to the team real quick maybe you can figure what’s wrong as i checked the animation and idk what to look for

I downloaded the animation with the in place option enabled. I’ve uploaded this to your project and it looks like it’s working fine now. Can you confirm this?

3 Likes

Yes, thank you it is working now, i guess it was the type of animation. Thanks a lot for helping!

1 Like