Workshop.codes
Create
DoritoCat

Simple 2D Top-Down Camera

A very simple code meant to be as efficient as possible. It allows the player to look down onto the Workshop Island and navigate in a 2D manner using the regular camera inputs, clamped to the inner board grid. Included in it are some simple calculations to convert the cursor location to the tiles in the board(from 0,0 in the top-left to 7,7 in the bottom-right). Useful for creating puzzles and whatnot. Available in "ongoing" and "subroutine" variants.

MIGHT work with more than one player since everything is managed in "Event Player" rules and uses player variables, but I haven't tested it.

Note: I have locked the maps to the workshop island and the hero to Mercy, but it absolutely works on others. It's just that generally players will have higher sensitivity settings on Mercy(and a neutral crosshair) and the workshop island has that nice chess-like grid, but feel free to experiment with other maps and heroes if you like. In that case, you can disable/adjust the "Clamp camera angles" rule to be whatever values you need.

Created on July 1st 2024 by DoritoCat. Might update if needed.

Players | 1 - 1
Categories: Tools, Miscellaneous
Tags: camera puzzle 2d
Heroes: Mercy
Created at:
Last updated:
Current version: 1.0.0

Snippet

Loading...

Users Also Like

Similar Codes

Workshop.codes
Join the Workshop.codes Discord