my if condition is-
if ((mouseX >= width - 10)) {
rigidbody.velocity = transform.forward * speed;
}
View attachment 125355
the condition is true as shown in the screenshot.
but my body doesn't move. (the move function is correct as i can move it by key press but it doesn't move by this statement)
if ((mouseX >= width - 10)) {
rigidbody.velocity = transform.forward * speed;
}
View attachment 125355
the condition is true as shown in the screenshot.
but my body doesn't move. (the move function is correct as i can move it by key press but it doesn't move by this statement)