Question by
cunibon · Jan 03, 2021 at 09:17 PM ·
movementvideotime.deltatimescreen size
Character speed changes with screen
Hey I'm working on game at the moment and just made my first build for fun.
but the moment i started moving i noticed that my charakter moved a million times faster than in unity. i dont know why that is though as im multiplying with Time.deltaTime and everything else should be fixed, right?
my code looks like this:
public float thrust = 20;
void Update()
{
Horizontal = Input.GetAxisRaw("Horizontal");
rb.velocity = new Vector2(100 * Horizontal * thrust * Time.deltaTime, rb.velocity.y);
}
here is a video of the changes
https://drive.google.com/file/d/1KslTIB0pWa1tDC8JO1SpV3ykO-BMidVc/view?usp=sharing
what did i do wrong?
Comment
Your answer
Follow this Question
Related Questions
Cannot Achieve Smooth Infinite Movement 1 Answer
deltaTime on fixedUpdate 1 Answer
Movement smoothing stopped working. 1 Answer