I’m currently working on a 2D platformer that the player places objects in specific locations and hit the PLAY BUTTON, the “Player Avatar” will run towards each object placed following the placement sequence. This is controlled by an scripted A.I.
Everything is fine and dandy when it runs on mobile devices on 30± FPS, but when I set the FPS to ± 60 FPS, or run it in Unity Debug, There will be a chance of occurrence that the A.I. would execute the Jump method twice. Since my “Player Avatar” movement control uses AddForce to the RigidBody2D, this resulted in problem where the “Player Avatar” would shoot up way beyond its supposed trajectory and then lands back down.
As of now, my project replaces Update() in C# with StartCoroutine(). But I’ve checked that all Coroutines called is accounted for and none were unintentionally called.
Does anyone experienced similar scenario?
Any help would be greatly appreciated.