#Velocity discussion
1 messages · Page 1 of 1 (latest)
ok so then in update, you do rb.velocity = new Vector3(Xinput,rb.velocity.y,Zinput);
The void Update() thingy
yes
Ok
first declare float Xinput; and float Yinput; before the start method, add Xinput = Input.getAxis("Horizontal"); and below that Yinput = Input.getAxis("Vertical"); inside update. than inside update add rb.velocity = new Vector2(Xinput,Yinput);
actually your also goin to want to add a speed variable to adjust your characters speed. so before start declare: float speed; than in update instead of rb.velocity = new Vector2(Xinput,Yinput); do rb.velocity = new Vector2(Xinput*speed,Yinput*speed);
got it?
if none of this makes sense than just look up a tutorial on 2d movement in unity
I wont torture you
I will screenshot it
But i dont get ut
Im bad at csharp
But i appreciate your time to help
how long have you been doing unity?
Well
I already made a simple game
Maybe 2 months
Or 1
When it comes to csharp coding i just look up tutorials i dont know anything
i suggest you watch more unity tutorials before starting your next game, look up some tutorial on 2d movement in unity
Ok
they arent very long