how to Move cube on a grind like The Last Cube

I am trying to have the player control a cube and move on a grid system similar to the game “The Last Cube” but I am still really new to Unreal Engine. Can someone help me and explain how to do this in Blueprints? in as simplest terms as possible please

There are a few option:

  1. Use a Rotation matrix - Wikipedia to rotate the cube from one of the edges.
  2. Fake it attaching / detaching the cube to a moving scene component. For example:
    RubeRoll

Might be better with rotation matrix if you need the cube to move in a grid with ramps.

1 Like

So would this all work if I turn it into a function so it can work with player input? where it will only move each time the player presses the move button? with the blueprint that is there? I am still relevantly new so still trying to learn most things

It needs a bit more to make it work with input. I’ll try and setup something you can download tomorrow.

Finally had some time to sit down.
RollingCube

RollingCube_UE_5_3.zip (66.7 KB)

This is the “fake it” option working based on the camera. IMO rotation matrix will get better results and allow for easier iteration. The math is something that you need to study on your own, all I can do is help implement it in the engine.

Hope it helps.

1 Like