Hello, sorry if in wrong part… I found this on asset store, But is there a website that as tut on how to do it yourself? Is it Animations or is it a script to do it?
Thank you
Hello, sorry if in wrong part… I found this on asset store, But is there a website that as tut on how to do it yourself? Is it Animations or is it a script to do it?
Thank you
This is a very specific sort of game; I wouldn’t expect to find a tutorial about how to do that specifically. Nothing in it is very hard, though, and the skills you need are well taught by all the other Unity tutorials. Spend a month or two doing those (really doing them, not just “watching” them), and then I bet you’ll see how to make a game like this.
True, I just needed now how to make cube go, left,right,up & down but rotate when pressing down the keys.
Well, you call transform.Rotate to rotate the cube (you want to rotate a little bit on each frame, i.e. each Update call). And then you’ll probably want to also update the position too, so that the cube lifts up a little bit as it rolls. This is where all the middle-school math teachers whose students said “When will I ever need to use this stuff?” are now laughing.
The height (Y position) of the cube describes a sine function as you roll, so you can use Mathf.Sin to calculate that.