I have a basic script that pause everything with time.timescale and I have another script that should allow player movement when the screen is paused but it doesnt work. What am I doing wrong that makes this not controllable?
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
Vector2 moveInput = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
moveVelocity = moveInput * speed;
}
void FixedUpdate()
{
rb.MovePosition(rb.position + moveVelocity * Time.unscaledDeltaTime);
}