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:
- Use a Rotation matrix - Wikipedia to rotate the cube from one of the edges.
- Fake it attaching / detaching the cube to a moving scene component. For example:
Might be better with rotation matrix if you need the cube to move in a grid with ramps.
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_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.