I’m trying to make a differential drive vehicle (like a robot/tank) in PlayCanvas.
I don’t want to use Ammo.js RaycastVehicle or wheels — just a single rigidbody box that moves forward/backward and rotates by applying forces/torque.
My controls idea:
- W/S → move forward/backward (apply force).
- A/D → rotate left/right (apply torque).
The problem:
- When I press W or S, the vehicle skids/slides around instead of moving straight in its local forward direction.
- When I apply torque for turning, sometimes it spins strangely in world space.
What I want is:
- A single script attached to the rigidbody.
- Proper local forward/backward motion.
- Smooth local Y-axis rotation (like real differential drive).
- No skidding when just going straight.
How can I apply the forces/torques correctly to make this work?