Skip to content

Feat/upgrade and bug fix#281

Merged
wass08 merged 10 commits intopascalorg:mainfrom
sudhir9297:feat/upgrade-and-bug-fix
Apr 29, 2026
Merged

Feat/upgrade and bug fix#281
wass08 merged 10 commits intopascalorg:mainfrom
sudhir9297:feat/upgrade-and-bug-fix

Conversation

@sudhir9297
Copy link
Copy Markdown
Contributor

What does this PR do?

This PR introduces a mix of UX improvements, duplication workflows, geometry fixes, walkthrough (first-person) functionality, and rendering corrections across multiple editor systems.

It focuses on:

  • Improving material editing consistency and paint-mode behavior
  • Adding duplication workflows for floor plans and levels
  • Fixing placement, snapping, and geometry issues
  • Introducing a full first-person walkthrough system with collision
  • Enhancing spawn point handling and visuals
  • Improving door rendering logic and walkthrough collisions

Material & Paint UX

  • Standardized custom material controls in paint-panel.tsx:
    • Reused the same slider component pattern for:
      • Roughness
      • Metalness
      • Opacity
  • Hid wall-building shortcut helper while material paint mode is active:
    • Prevents tool hint overlay from appearing during paint mode

Placement & Snapping Fixes

  • Fixed ceiling-attached item placement after moving floors/levels:
    • Switched to ceiling-local coordinates for snapping and preview alignment

Floor Plan & Level Duplication

  • Added floor plan duplication support in site panel:

    • Creates a copy with same settings
    • Applies slight offset to avoid overlap
  • Added level duplication in:

    • Level actions menu
    • Floating level selector menu
  • Implemented subtree cloning:

    • Duplicates full level and its contents
    • Automatically selects duplicated level

Level Duplication Options

  • Added "Duplicate with options..." flow
  • Shared duplication logic across menus
  • Implemented duplication presets:
    • Everything
    • Structure only
    • Structure + materials
    • Structure + furniture

Stair Opening & Geometry Improvements

  • Reworked curved stair auto-opening generation:

    • Based on actual stair rise and target surface elevation
    • No longer relies on fixed arc slices
  • Extracted reusable helpers:

    • Step count calculation
    • Arc opening polygon generation
  • Updated curved stair cutouts:

    • Respond to actual target elevation (slabs/ceilings)
  • Improved opening coverage:

    • Increased default opening ratio
    • Added step padding so openings start earlier

Door Rendering Fixes

  • Fixed door segment rendering:
    • Selecting "Empty" no longer renders a solid panel
  • Stopped rendering internal dividers for empty segments
  • Added guard:
    • If all segments are empty → hide:
      • Leaf border trim
      • Handle
      • Door closer
      • Panic bar
      • Hinges
  • Updated door schema to define "empty" as no leaf fill

First-Person Walkthrough

  • Replaced previous walkthrough with a new custom first-person controller
  • Added BVH-based collision system
  • Implemented:
    • Gravity
    • Jump
    • Sprint
    • Slope handling
    • Collision response
  • Disabled editor camera controls during walkthrough
  • Added pointer-lock with Esc exit handling
  • Fixed keyboard conflicts so movement keys don’t trigger editor shortcuts
  • Restored active floor automatically after exit
  • Hid spawn marker while in walkthrough
  • Fixed start position to use spawn’s real world transform

Spawn Point System

  • Introduced a dedicated Spawn Point scene node

  • Added spawn to Build tools for direct placement

  • Integrated spawn into:

    • Scene graph
    • Selection system
    • Property panel
  • Updated behavior:

    • Live rotation updates during interaction
    • Correct placement using level-local coordinates
    • Singleton pattern (only one spawn per project)
    • Reusing spawn moves it instead of duplicating
  • First-person mode always starts from this spawn point


Spawn Marker Visuals

  • Replaced previous figure with simplified block-style marker
  • Built custom marker with:
    • Body
    • Head
    • Ring
    • Direction indicator
  • Unified materials and colors
  • Memoized shared materials for performance
  • Tuned placement and rotation of marker components
  • Hid player capsule preview while keeping selection active

Collision & Walkthrough Fixes

  • Built collider world from scene registry
  • Excluded non-collision helper meshes
  • Fixed collider hierarchy issues:
    • Prevented parent nodes from re-including child colliders
  • Updated door collision:
    • Empty or fully empty doors no longer block movement

Walkthrough UI

  • Added first-person overlay UI:
    • Crosshair
    • Exit button
    • Movement hints
  • Fixed crosshair alignment
  • Moved help panel to right-side vertical layout
  • Improved readability of controls (Jump/Sprint)

Editor & Toolbar Polish

  • Updated Build tab spawn icon:
    • Replaced custom icon with standard generic icon

@wass08 wass08 merged commit acc9b1d into pascalorg:main Apr 29, 2026
1 check passed
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.

2 participants