Jump to content
  • Advertisement
Osaid

unity 2d weird glitch

Recommended Posts

Advertisement

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!