Unity 2023: Why does my Rigidbody not react to force when using Continuous Dynamic collision detection?
I'm working on a 2D game in Unity 2023 and I've set up a Rigidbody2D for my player character to make it responsive to physics. However, I'm encountering an issue where the Rigidbody2D doesn't seem to respond to the force I apply when using Continuous Dynamic collision detection. My Rigidbody2D is set to Continuous Dynamic, but it appears to ignore the forces I'm applying during gameplay. Hereโs a snippet of my code where I apply force to the Rigidbody2D: ```csharp using UnityEngine; public class PlayerController : MonoBehaviour { private Rigidbody2D rb; void Start() { rb = GetComponent<Rigidbody2D>(); } void Update() { if (Input.GetKey(KeyCode.W)) { rb.AddForce(new Vector2(0, 10), ForceMode2D.Force); } if (Input.GetKey(KeyCode.A)) { rb.AddForce(new Vector2(-10, 0), ForceMode2D.Force); } if (Input.GetKey(KeyCode.D)) { rb.AddForce(new Vector2(10, 0), ForceMode2D.Force); } } } ``` I have also made sure the Rigidbody2D's Mass is set to 1 and Gravity Scale is set to 0 so that gravity does not affect my physics calculations, yet the player seems unresponsive to the applied forces. When I switch the collision detection mode to Discrete, the player responds properly to the forces, but I need Continuous Dynamic to avoid tunneling issues with fast-moving objects. Additionally, Iโve checked the following: - The Rigidbody2D isn't kinematic. - The colliders are correctly set up. - I donโt have any constraints applied to the Rigidbody2D. Despite trying various combinations of settings and applying the forces in different ways (like using `ForceMode2D.Impulse`), nothing seems to work when Continuous Dynamic is enabled. Any suggestions on what might be causing this issue or how I can resolve it? Thanks in advance!