playMaker

Author Topic: Strange Possible Bug? (Solved)  (Read 543 times)

DABYX

  • Playmaker Newbie
  • *
  • Posts: 8
Strange Possible Bug? (Solved)
« on: July 17, 2021, 08:25:53 AM »
Update: I'm a fool. I think it's just a behaviour of my enemies being kinematic and occasionally not triggering collisions at the very start of runtime. Why it happens to only some instances idk but I will have to find a way around it.
Aka: probably expected behaviour.

Hi guys,

I know I've not long posted a help topic but it won't be a common occurrence. Promise!

I just was working on my project last night and suddenly 1 out of 2 of my enemy object began to act strangely out of nowhere.

I'm not super great at explaining things but I'll try and set it out step by step.

I had 2 enemy objects with the exact same FSM's and properties.

One FSM is a basic wandering where the start state chooses from 3 random options, (walk left, walk right or idle) and loops back to that start state.

For weeks both enemies behave perfectly and would choose a random option and start walking in a direction.

However last night only one of these enemies started walking on the spot with 0 velocity for the first time and then corrected itself the following times.

I went through a LOT of troubleshooting, changing rigidbodies, collision boxes on thebenemies and ground object etc. Added a different start state that waited 1 frame then chose an option. Moving the non working enemy around etc.

And every time the buggy enemy would always walk on the spot.

I even duplicated the working enemy but the duplication acted buggy also!

Finally after already closing and restarting unity twice I just deleted the buggy versions, closed unity, restarted and added 2 more via duplicating and the behaviour just vanished.

They all worked fine again. Every time.

Is this something that can happen eg. Collision bugs or bugs with actions when first starting the game? I tried to search but my situation is a bit specific.

Anyway, sorry for the wall of text and another help topic. I am just a bit concerned if it happens again whether there is something I may need to change.

I haven't checked it yet today but I've got my fingers crossed!
« Last Edit: July 20, 2021, 02:46:24 AM by DABYX »