How to rotate and move a cube (Like This)

Hi guys i am working on a game that needs cube movement Like This:


I will reward the user

thats a pretty simple animation. use the animator. write an animation, which for this is simple that movement.

Alternatly if you want to use physics, use a rigidbody on the cube and rigidbody.applyforceatposition(force,position) where force is how much force to apply and position in this case will be the top middle left (so for a one meter cube like that, y or height of 1, and 0.5 x, 0.5y) applied in the right direction, basically using physics to push the top left to tip over again. But this is clearly done by animation in the video, it’s too consistent and uniform.

that consists of an animation that’s really just like 6 key frames (key frames are basically you posing something in a position)

Animation works by you making what are called key frames where you pose an object.

Then you basically pick a period of time and then create another key frame, the way animation works is if the hard working engine just needs where it started (the first key frame) and where it ended (the next one) and it will seamlessly blend the movement to make it look natural in between as it plays. So for example if you show a leg on the sword pointed out by your side and and a second key frame with it pointed out further forward, you dont have to worry about it between, when you play the animation, it will smoothly transition it from the first to the second key frame, creating a stabbing motion basically and all you did was tell it where to start and wehre to end.

Likewise for this, they created a few poses, where it starts on the ground, where it is say 25% of the way through a movement, half way, 75% and one full flip to another side of the cube. Now the animation program machanim will when you play make it so that it moves through that.