From 72fe0867959d74755f8d3e43329c0f865d84416f Mon Sep 17 00:00:00 2001 From: Kintaro Kawai Date: Thu, 19 Oct 2023 12:20:40 +1000 Subject: [PATCH] fixed physicsmovementcomponent bug --- .../game/physics/components/PhysicsMovementComponent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/src/main/com/csse3200/game/physics/components/PhysicsMovementComponent.java b/source/core/src/main/com/csse3200/game/physics/components/PhysicsMovementComponent.java index 002efdb56..efbbf027b 100644 --- a/source/core/src/main/com/csse3200/game/physics/components/PhysicsMovementComponent.java +++ b/source/core/src/main/com/csse3200/game/physics/components/PhysicsMovementComponent.java @@ -11,7 +11,7 @@ /** Movement controller for a physics-based entity. */ public class PhysicsMovementComponent extends Component implements MovementController { private static final Logger logger = LoggerFactory.getLogger(PhysicsMovementComponent.class); - private Vector2 speed; + private Vector2 speed = Vector2.Zero; private PhysicsComponent physicsComponent; private Vector2 targetPosition; private boolean movementEnabled = true;