unity 2d weird glitch

Started by
4 comments, last by GWDev 4 years, 8 months ago

i tried everything, and ensured that i did the same thing the tutor did. but still the weird glitch wont go away

the skeleton flips horizontally twice then stops, i want it to stop when i get close

video: https://gofile.io/?c=itdYMM

code: https://textuploader.com/1r4xc

the calm nonsense kid

Advertisement
41 minutes ago, Osaid said:

the tutor did

Is this homework?

Hello to all my stalkers.

no, i am trying to learn game development, and i took that course

it's a good course. the only problem i encountered was my skeleton, it looks like the skeleton glitchs every time the rigidbody value changes, or when it changes to 0

i don't know why, i am a beginner and i tried asking a question in stackoveflow but found out it's almost impossible to ask questions there

the calm nonsense kid

It seems like the skeleton stops abruptly sometimes, but the only place in the code I see the velocity being set to zero is when 'anim.GetBool("Death")' returns true. Is that ever returning true?

In any case, I don't know if there's a debugger you can use with Unity (I'm guessing there is), but a low-tech debugging approach you can use is to log things to the console. Here, for example, you could add some log messages to indicate if 'anim.GetBool("Death")' is returning true, when the sign of mBody.velocity.x is changing, and so on.

9 hours ago, Zakwayda said:

In any case, I don't know if there's a debugger you can use with Unity (I'm guessing there is)

You can attach Visual Studio (if running Windows of course) and debug with it.

This topic is closed to new replies.

Advertisement