feat: CameraController Rotated Movement
This commit is contained in:
parent
0cb8170530
commit
257e414c2a
|
@ -34,14 +34,12 @@ public class CameraController : BehaviourOverride
|
|||
if (buttonInputs.IsPressed(Keys.J))
|
||||
cameraBehaviour.Zoom -= Time.Elapsed.Nanoseconds * 0.00025f;
|
||||
|
||||
if (buttonInputs.IsPressed(Keys.NumPad8))
|
||||
cameraBehaviour.BehaviourController.GameObject.Transform.Position += Vector2D.Up;
|
||||
if (buttonInputs.IsPressed(Keys.NumPad2))
|
||||
cameraBehaviour.BehaviourController.GameObject.Transform.Position -= Vector2D.Up;
|
||||
if (buttonInputs.IsPressed(Keys.NumPad6))
|
||||
cameraBehaviour.BehaviourController.GameObject.Transform.Position += Vector2D.Right;
|
||||
if (buttonInputs.IsPressed(Keys.NumPad4))
|
||||
cameraBehaviour.BehaviourController.GameObject.Transform.Position -= Vector2D.Right;
|
||||
|
||||
if (buttonInputs.IsPressed(Keys.NumPad8)) cameraBehaviour.BehaviourController.GameObject.Transform.Position += Vector2D.Up.Rotate(Transform.Rotation * Math.DegreeToRadian) * Time.DeltaTimeFrame;
|
||||
if (buttonInputs.IsPressed(Keys.NumPad2)) cameraBehaviour.BehaviourController.GameObject.Transform.Position -= Vector2D.Up.Rotate(Transform.Rotation * Math.DegreeToRadian) * Time.DeltaTimeFrame;
|
||||
if (buttonInputs.IsPressed(Keys.NumPad6)) cameraBehaviour.BehaviourController.GameObject.Transform.Position += Vector2D.Right.Rotate(Transform.Rotation * Math.DegreeToRadian) * Time.DeltaTimeFrame;
|
||||
if (buttonInputs.IsPressed(Keys.NumPad4)) cameraBehaviour.BehaviourController.GameObject.Transform.Position -= Vector2D.Right.Rotate(Transform.Rotation * Math.DegreeToRadian) * Time.DeltaTimeFrame;
|
||||
|
||||
|
||||
if (buttonInputs.IsPressed(Keys.Q))
|
||||
cameraBehaviour.BehaviourController.GameObject.Transform.Rotation += Time.Elapsed.Nanoseconds * 0.0025f;
|
||||
|
|
Loading…
Reference in New Issue