This is the Superliminal Datapack, a Minecraft datapack inspired by the core mechanic of the Steam game Superliminal, implementing Forced Perspective
The technical implementation of Forced Perspective can be broadly divided into two parts.
Summon a block display with passenger interaction.
When this interaction is clicked, raycasting begins. With each step of the raycast, the block's size is adjusted, and then it is checked to see if the block has hit a wall.
When the player clicks the interaction, the distance between the player and the block, as well as the block's size, are saved. Let's call this distance
During each step of the raycast, the block's position moves slightly backward from the player's point of view. The new distance between the player and the block after it has moved is saved. Let's call this
To determine the block's new size, you first need to find the size ratio
Now, by multiplying the size ratio
- Download the datapack from
Code -> Download ZIP - Place the downloaded file into the
datapacksdirectory of your Minecraft world save. - Start or
/reloadthe world to activate the datapack.
- Only one player should have the
playertag. Use/tag @s add player - Use
/function slm:setting/create_blockto summon a block. - To remove a block, hold any sword and left-click on it.
Use
/function slm:uninstalland remove datapack from datapacks folder
This project is licensed under the MIT License.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the datapack.