I am attempting to implement a building system into a game I’m working on. It needs to have the following properties:
- It must spawn an object - which will now be referred to as the “block” - at mouse position when the left mouse button is clicked.
- It must show either an outline or a “ghost” of the block at the mouse position before spawning the block.
- If there’s already an object or another block at the mouse position, then it must place the block above that object.
- The block’s movement by the mouse position must be restricted by an increment of 1 for every axis of its Vector3.
I wasn’t able to find any another topic that helped with exactly this, which is why I’m asking this now.