First unity non tutorial project. Cube mover

Опубликовано: 31 Июль 2026
на канале: MICK BARRETTO
26
0

Rotation of a cube on non origin point. Requires creation of parent game object at desired rotation point and rotating on that. Also requires recreation of new cube instance (prefab) at expected final location to account for unity not being exact in rotation and positioning after rotation.

Result is what looks like a single cube able to seemlesly move around a map by rotating on its sides from location to location.

Note a similar feet could be done using forces but this was done without applying physics forces as it would result in not perfect movements / not fluid transitions.