Challenge | Solution |
---|---|
Player Switching System Switching caused both players to teleport forwards or made UI not update correctly. |
Built a PlayerManager script to control active/inactive states, camera focus, and UI. Enabled/disabled input on switch. |
Character Mirroring Inactive character jittered or desynced from active player. |
Updated CloneController script that mirrors displacement and rotation frame-by-frame using Rigidbody physics, preventing snapping/teleporting. |
Ground & Collision Detection Players sometimes floated or failed to reset states. |
Used OnCollisionEnter to detect grounded states, ensuring consistent platforming mechanics.
|
Box Interaction Switching while pushing boxes caused unwanted force launches. |
Controlled Rigidbody constraints during collisions and adjusted logic to release/lock object movement safely. |
Scene Management Needed handling for falling out of the map and level completion. |
Added fall detection that reloads current scene on drop and scene index checks to quit game if no next level exists (freezing at the end of level 3). |