Fix/surface placement transforms & AI simulation - #159
Open
TheDevilsKnock wants to merge 3 commits into
Open
TheDevilsKnock wants to merge 3 commits into
TheDevilsKnock wants to merge 3 commits into
Conversation
Preserve object transforms when aligning, snapping, or resetting surface alignment. - centralize surface raycasting and transform calculations - preserve heading and uniform scale during surface alignment - snap objects vertically without changing their world X/Z position - preserve position and scale when resetting alignment - record undo actions only when objects are actually modified
Centralize surface detection, alignment, and height correction in the EditorSurfacePlacement utility. Preserve object heading and uniform scale when aligning transforms to surface normals, avoiding rotation drift during continuous placement. Snap dragged objects to the detected surface independently of magnet alignment, while retaining the existing ground-mode behavior. Preserve multi-object layout offsets during dragging and project each selected object onto its own underlying surface in magnet mode. Apply the same surface-placement behavior to in-hand objects, including per-object surface alignment, scale-aware height offsets, and stable placement heading. Cache repeated surface projections and ignored-object collections to reduce raycast allocation and processing during frame updates. Update clipboard placement and surface commands to use the shared implementation and skip invalid surface transforms safely. Finalize independently placed child transforms through undo and multiplayer synchronization when dragging ends.
Separate creature simulation from active AI behavior so editor spawned animals and infected can safely transition between frozen, passive, and active states. - spawn editor objects with simulation disabled by default - remove eager AI initialization and the delayed simulation-disable race - initialize AI agents only when active behavior is requested - synchronize creature transforms before re-enabling simulation to prevent objects returning to their original spawn position - restore an entity's previous simulation state after inventory editing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.