Skip to content

Feat: entity lock, entity spawn handling#9

Open
Oggymot wants to merge 2 commits intoSpooni-Development:mainfrom
Oggymot:main
Open

Feat: entity lock, entity spawn handling#9
Oggymot wants to merge 2 commits intoSpooni-Development:mainfrom
Oggymot:main

Conversation

@Oggymot
Copy link

@Oggymot Oggymot commented Feb 15, 2026

Description: This PR introduces quality-of-life improvements focused on building precision and preventing accidental edits to placed props. For instance, when an editor is furnishing a house or an interior, it was previously common to accidentally select the building shell itself, leading to unintended movement or even deletion of the entire structure.

Key Changes:

  • Entity Locking:

    • Added Lock/Unlock buttons to the entity Properties Menu.
    • Movement Protection: Locked entities cannot be moved or rotated using the mouse (gizmo) or keyboard controls.
    • Deletion Protection: Locked entities cannot be deleted individually via the standard delete keybind.
    • Focus Protection: Locked entities are ignored when trying to Focus (Alt) on an object, preventing accidental camera snapping to background props.
    • Note: The "Delete All" function in the Database Menu will still remove locked entities to allow for a complete cleanup.
  • Spawn at Last Z-Coordinate:

    • Added a modifier key for spawning. Holding CTRL (mapped to INPUT_DUCK) while spawning an entity will place it at the exact Z-coordinate (height) of the previously spawned entity.
    • This allows for easier placement of multiple objects on tables, shelves, or floating platforms without them snapping to the ground.
  • UI Updates:

    • Updated index.html and script.js to include the new Lock/Unlock controls in the properties interface.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant