Claude/fix player pivot clipping 01 p312 cx rh exc kq du jhdx fet#12
Open
andreathar wants to merge 9 commits intoatharmcpfrom
Open
Claude/fix player pivot clipping 01 p312 cx rh exc kq du jhdx fet#12andreathar wants to merge 9 commits intoatharmcpfrom
andreathar wants to merge 9 commits intoatharmcpfrom
Conversation
* feat: Create comprehensive GameCreator multiplayer implementation plan Added complete planning documentation for making all GameCreator modules multiplayer-ready: PLANNING DOCUMENTS: - Master Implementation Plan (GAMECREATOR_MULTIPLAYER_MASTER_PLAN.md) - 8 modules analyzed (Core, Stats, Inventory, Quests, Dialogue, Behavior, Perception, Tactile) - Phase-by-phase implementation strategy - Priority matrix (P0-P3) - Testing strategy and scenarios - 6 implementation phases over 6-8 weeks - Next Steps Guide (MULTIPLAYER_NEXT_STEPS.md) - Immediate action items for Phase 2 - Code templates for network integration - File structure and modification list - Quick start instructions - Module Inventory (GameCreator_Module_Inventory.md) - Comprehensive component catalog - Network synchronization requirements - State management analysis - Priority checklist - File Reference (GameCreator_File_Reference.md) - File-by-file breakdown - Module dependencies - Organization structure STRATEGY: - Invasive integration pattern (modify GameCreator source) - Server authority for security-critical operations - NetworkVariables for continuous state - RPCs for discrete events - Phase 1 (Movement) already complete PRIORITY PHASES: 1. ✅ Phase 1: Core Movement (COMPLETE) 2. ⏳ Phase 2: Core Combat (Motion, Player, Facing, Combat, Jump, Dash) 3. Phase 3: Stats & Vitals (Traits, Health, Status Effects) 4. Phase 4: Inventory & Equipment (Bag, Items, Currency) 5. Phase 5: Advanced Features (Quests, Dialogue, Perception) 6. Phase 6: Polish & Optimization Ready to begin Phase 2 implementation. * feat: Implement Phase 2 (Core Combat) and Phase 3 (Stats) multiplayer support PHASE 2 - CORE COMBAT COMPLETE: Discovered most Phase 2 work was already done in previous sessions: ✅ UnitMotion - Network checks already present (TUnitMotion.cs) ✅ UnitPlayer - Input authority already implemented (all variants) ✅ UnitFacing - Rotation sync already implemented (TUnitFacing.cs) NEW IMPLEMENTATIONS: 1. NetworkCombatAdapter.cs (600+ lines) - Weapon state synchronization (equipped, aiming, charging) - Blocking and defense state sync - Fire weapon RPCs (owner -> server -> all clients) - Hit detection with server-validated damage - Server authority prevents cheating - Public API: SetAiming, SetBlocking, Fire, ReportHit 2. NetworkCharacterAdapter.cs enhancements - Added Jump sync RPCs (JumpServerRpc/ClientRpc) - Added Dash sync RPCs (DashServerRpc/ClientRpc) - Remote players: visual only (no physics) - Public API: SyncJump, SyncDash 3. Props sync (implicit) - Covered by Combat EventEquip/EventUnequip - Props attach/detach with weapon changes PHASE 3 - STATS & VITALS FOUNDATION COMPLETE: 1. NetworkTraitsAdapter.cs (500+ lines) - Health/Mana/Stamina NetworkVariables (real-time sync) - Stats NetworkList (STR, DEF, INT, etc.) - Status effects NetworkList (buffs/debuffs) - Server authority for all stat changes - Throttled sync rates (10Hz attributes, 2Hz stats) - Damage/heal RPCs with validation - Public API: GetHealth, TakeDamage, Heal, ApplyStatusEffect INTEGRATION NEEDED (Phase 3 Next Steps): - Map GameCreator IdStrings to network IDs - Hook RuntimeAttributes read/write - Hook RuntimeStats sync - Hook RuntimeStatusEffects sync - Connect to Traits.EventChange ARCHITECTURE: - Companion adapter pattern (NetworkXXXAdapter + GameCreator component) - Server authority for security-critical operations - NetworkVariables for continuous state - RPCs for discrete events - INetworkSerializable for custom types STATS: - Files created: 3 (NetworkCombatAdapter, NetworkTraitsAdapter, implementation report) - Files modified: 1 (NetworkCharacterAdapter) - Lines added: ~1,185 production code - Phase 2: ✅ COMPLETE (needs integration testing) - Phase 3: ✅ FOUNDATION COMPLETE (needs GameCreator integration) Ready for integration testing and Phase 3 completion. * Route server pose corrections through owner * feat: Add Player_Network prefab automated setup tooling Created comprehensive tooling to configure Player_Network prefab with all multiplayer components: NEW FILES: 1. SetupPlayerNetworkPrefab.cs (Automated Setup Script) Location: Assets/Plugins/GameCreator/Packages/GameCreator_Multiplayer/Editor/ Features: - Menu command: GameCreator → Multiplayer → Setup Player Network Prefab - Automatically adds NetworkCombatAdapter - Automatically adds NetworkTraitsAdapter - Automatically adds Traits (Stats component) - Automatically adds Bag (Inventory component) - Automatically adds Perception (if module installed) - Verifies base components exist - Configures default settings - Shows setup summary - Menu command: GameCreator → Multiplayer → Verify Player Network Prefab 2. PLAYER_NETWORK_PREFAB_SETUP.md (Comprehensive Guide) Location: claudedocs/guides/ Content: - Quick automated setup instructions - Detailed manual setup (8 steps) - Component configuration details - Verification checklist - Testing procedures - Troubleshooting guide - Code usage examples - Common mistakes to avoid 3. PLAYER_PREFAB_SETUP_QUICK.md (Quick Reference Card) Location: claudedocs/quick-reference/ Content: - One-line automated setup - Components added list - Manual steps required - Quick test procedure - Code snippets - Common issues COMPONENTS CONFIGURED: Required Components (Added by script): ✅ NetworkCombatAdapter - Combat/weapon synchronization - Fire weapon RPCs - Hit detection (server-validated) - Aiming/blocking state sync ✅ NetworkTraitsAdapter - Health/Mana/Stamina sync (10Hz) - Stats sync (STR, DEF, etc.) (2Hz) - Status effects sync (buffs/debuffs) - Server authority (anti-cheat) ✅ Traits (GameCreator Stats) - HP, MP, Stamina attributes - Character stats - Status effects ✅ Bag (GameCreator Inventory) - Item storage - Equipment slots - Currency system ✅ Perception (GameCreator - Optional) - Awareness system - AI detection USAGE: Automated (Recommended): 1. Open Unity Editor 2. Menu: GameCreator → Multiplayer → Setup Player Network Prefab 3. Assign Class to Traits component 4. Configure Bag slots 5. Test in multiplayer scene Manual: Follow step-by-step guide in PLAYER_NETWORK_PREFAB_SETUP.md TESTING CHECKLIST: - [ ] Run automated setup script - [ ] Verify all components added - [ ] Assign Class to Traits - [ ] Configure Bag capacity/slots - [ ] Test movement in multiplayer - [ ] Test combat sync - [ ] Test damage sync - [ ] Test inventory sync Ready for Unity Editor testing! --------- Co-authored-by: Claude <noreply@anthropic.com>
) * feat: Create comprehensive GameCreator multiplayer implementation plan Added complete planning documentation for making all GameCreator modules multiplayer-ready: PLANNING DOCUMENTS: - Master Implementation Plan (GAMECREATOR_MULTIPLAYER_MASTER_PLAN.md) - 8 modules analyzed (Core, Stats, Inventory, Quests, Dialogue, Behavior, Perception, Tactile) - Phase-by-phase implementation strategy - Priority matrix (P0-P3) - Testing strategy and scenarios - 6 implementation phases over 6-8 weeks - Next Steps Guide (MULTIPLAYER_NEXT_STEPS.md) - Immediate action items for Phase 2 - Code templates for network integration - File structure and modification list - Quick start instructions - Module Inventory (GameCreator_Module_Inventory.md) - Comprehensive component catalog - Network synchronization requirements - State management analysis - Priority checklist - File Reference (GameCreator_File_Reference.md) - File-by-file breakdown - Module dependencies - Organization structure STRATEGY: - Invasive integration pattern (modify GameCreator source) - Server authority for security-critical operations - NetworkVariables for continuous state - RPCs for discrete events - Phase 1 (Movement) already complete PRIORITY PHASES: 1. ✅ Phase 1: Core Movement (COMPLETE) 2. ⏳ Phase 2: Core Combat (Motion, Player, Facing, Combat, Jump, Dash) 3. Phase 3: Stats & Vitals (Traits, Health, Status Effects) 4. Phase 4: Inventory & Equipment (Bag, Items, Currency) 5. Phase 5: Advanced Features (Quests, Dialogue, Perception) 6. Phase 6: Polish & Optimization Ready to begin Phase 2 implementation. * feat: Implement Phase 2 (Core Combat) and Phase 3 (Stats) multiplayer support PHASE 2 - CORE COMBAT COMPLETE: Discovered most Phase 2 work was already done in previous sessions: ✅ UnitMotion - Network checks already present (TUnitMotion.cs) ✅ UnitPlayer - Input authority already implemented (all variants) ✅ UnitFacing - Rotation sync already implemented (TUnitFacing.cs) NEW IMPLEMENTATIONS: 1. NetworkCombatAdapter.cs (600+ lines) - Weapon state synchronization (equipped, aiming, charging) - Blocking and defense state sync - Fire weapon RPCs (owner -> server -> all clients) - Hit detection with server-validated damage - Server authority prevents cheating - Public API: SetAiming, SetBlocking, Fire, ReportHit 2. NetworkCharacterAdapter.cs enhancements - Added Jump sync RPCs (JumpServerRpc/ClientRpc) - Added Dash sync RPCs (DashServerRpc/ClientRpc) - Remote players: visual only (no physics) - Public API: SyncJump, SyncDash 3. Props sync (implicit) - Covered by Combat EventEquip/EventUnequip - Props attach/detach with weapon changes PHASE 3 - STATS & VITALS FOUNDATION COMPLETE: 1. NetworkTraitsAdapter.cs (500+ lines) - Health/Mana/Stamina NetworkVariables (real-time sync) - Stats NetworkList (STR, DEF, INT, etc.) - Status effects NetworkList (buffs/debuffs) - Server authority for all stat changes - Throttled sync rates (10Hz attributes, 2Hz stats) - Damage/heal RPCs with validation - Public API: GetHealth, TakeDamage, Heal, ApplyStatusEffect INTEGRATION NEEDED (Phase 3 Next Steps): - Map GameCreator IdStrings to network IDs - Hook RuntimeAttributes read/write - Hook RuntimeStats sync - Hook RuntimeStatusEffects sync - Connect to Traits.EventChange ARCHITECTURE: - Companion adapter pattern (NetworkXXXAdapter + GameCreator component) - Server authority for security-critical operations - NetworkVariables for continuous state - RPCs for discrete events - INetworkSerializable for custom types STATS: - Files created: 3 (NetworkCombatAdapter, NetworkTraitsAdapter, implementation report) - Files modified: 1 (NetworkCharacterAdapter) - Lines added: ~1,185 production code - Phase 2: ✅ COMPLETE (needs integration testing) - Phase 3: ✅ FOUNDATION COMPLETE (needs GameCreator integration) Ready for integration testing and Phase 3 completion. * Route server pose corrections through owner * feat: Add Player_Network prefab automated setup tooling Created comprehensive tooling to configure Player_Network prefab with all multiplayer components: NEW FILES: 1. SetupPlayerNetworkPrefab.cs (Automated Setup Script) Location: Assets/Plugins/GameCreator/Packages/GameCreator_Multiplayer/Editor/ Features: - Menu command: GameCreator → Multiplayer → Setup Player Network Prefab - Automatically adds NetworkCombatAdapter - Automatically adds NetworkTraitsAdapter - Automatically adds Traits (Stats component) - Automatically adds Bag (Inventory component) - Automatically adds Perception (if module installed) - Verifies base components exist - Configures default settings - Shows setup summary - Menu command: GameCreator → Multiplayer → Verify Player Network Prefab 2. PLAYER_NETWORK_PREFAB_SETUP.md (Comprehensive Guide) Location: claudedocs/guides/ Content: - Quick automated setup instructions - Detailed manual setup (8 steps) - Component configuration details - Verification checklist - Testing procedures - Troubleshooting guide - Code usage examples - Common mistakes to avoid 3. PLAYER_PREFAB_SETUP_QUICK.md (Quick Reference Card) Location: claudedocs/quick-reference/ Content: - One-line automated setup - Components added list - Manual steps required - Quick test procedure - Code snippets - Common issues COMPONENTS CONFIGURED: Required Components (Added by script): ✅ NetworkCombatAdapter - Combat/weapon synchronization - Fire weapon RPCs - Hit detection (server-validated) - Aiming/blocking state sync ✅ NetworkTraitsAdapter - Health/Mana/Stamina sync (10Hz) - Stats sync (STR, DEF, etc.) (2Hz) - Status effects sync (buffs/debuffs) - Server authority (anti-cheat) ✅ Traits (GameCreator Stats) - HP, MP, Stamina attributes - Character stats - Status effects ✅ Bag (GameCreator Inventory) - Item storage - Equipment slots - Currency system ✅ Perception (GameCreator - Optional) - Awareness system - AI detection USAGE: Automated (Recommended): 1. Open Unity Editor 2. Menu: GameCreator → Multiplayer → Setup Player Network Prefab 3. Assign Class to Traits component 4. Configure Bag slots 5. Test in multiplayer scene Manual: Follow step-by-step guide in PLAYER_NETWORK_PREFAB_SETUP.md TESTING CHECKLIST: - [ ] Run automated setup script - [ ] Verify all components added - [ ] Assign Class to Traits - [ ] Configure Bag capacity/slots - [ ] Test movement in multiplayer - [ ] Test combat sync - [ ] Test damage sync - [ ] Test inventory sync Ready for Unity Editor testing! --------- Co-authored-by: Claude <noreply@anthropic.com>
…ration (#5) Implements a complete power distribution and management system for city-building games with full GameCreator visual scripting and multiplayer support. Components: - PowerSource: Central power generator with distribution and overload detection - PowerConsumer: Building/house power consumer with auto-connection - PowerDevice: Individual devices (lights, appliances, etc.) with state management Visual Scripting Integration: - 6 Instructions: Turn On/Off/Toggle Device, Connect/Disconnect Consumer, Set Source Active - 7 Conditions: Device/Consumer/Source state checking Network Features: - Server-authoritative power calculations - Unity Netcode integration with NetworkVariables - Real-time power distribution and load balancing - Multiplayer-safe RPC methods Visual Feedback: - Status lights, emissive materials, particle effects - Audio feedback for state changes - Animator integration for device animations Documentation: - Complete usage guide with examples - API reference and troubleshooting - Configuration reference and performance tips Assemblies: GameCreator.Multiplayer.Runtime Co-authored-by: Claude <noreply@anthropic.com>
- Remove NetworkPlayerManager.cs.backup (2000+ lines) - Remove duplicated TargetType enum from NetworkDebugManager.cs - Remove dead code from NetworkPlayerManager.cs: - Unused GROUND_CHECK_RADIUS and CHARACTER_HEIGHT_OFFSET constants - Removed DelayedForcePosition_REMOVED method - Removed unused SpawnPlayerDelayed method - Deprecate AuthorityType enum in NetworkRPCManager (use NetworkAuthorityManager.NetworkAuthorityType) - Deprecate Spawn enum value in ManagerType (spawn now handled by NetworkPlayerManager) - Clean up unused spawn system tracking in ManagerCoordinator Co-authored-by: Claude <noreply@anthropic.com>
* fix: Resolve random leg animation in multiplayer characters Root Cause Analysis: - NetworkGameCreatorCharacterV2 was DISABLING the Character component - When Character is disabled, UnitAnimimKinematic.OnUpdate() never runs - Animator parameters (Speed, Speed-X, etc.) stayed at 0.0 - Animation played IDLE while body moved = "random leg" behavior Solution: 1. Created NetworkMultiplayerCharacter.cs - coordination/validation component - Ensures Character stays ENABLED (critical for animation) - Validates correct component setup - Warns if NetworkGameCreatorCharacterV2 is present (the problematic component) - Manages local/remote player setup 2. Created MultiplayerCharacterSetupEditor.cs - editor tooling - Menu: GameCreator > Multiplayer > Setup Selected as Network Character - Menu: GameCreator > Multiplayer > Validate Selected Network Character - Menu: GameCreator > Multiplayer > Fix Animation Issues on Selected - Removes conflicting components (NetworkGameCreatorCharacterV2, NetworkTransform) - Adds required components (NetworkCharacterAdapter, NetworkGameCreatorAnimator) 3. Improved NetworkGameCreatorAnimator.cs - Increased sync rate to 60Hz for smoother animation - Added interpolation for remote players (prevents jerky animation) - Better documentation on requirements Correct Architecture: - Character (MUST be enabled!) - NetworkCharacterAdapter (position/rotation sync) - NetworkGameCreatorAnimator (animator parameter sync) - NetworkMultiplayerCharacter (coordination) DO NOT USE: - NetworkGameCreatorCharacterV2 (disables Character, breaks animation) - NetworkTransform (conflicts with NetworkCharacterAdapter) * feat: Add unified NetworkPlayerController for GameCreator multiplayer Consolidates all GameCreator multiplayer modules (Character, Stats, Inventory, Perception) into a single coordinated solution. Key components: - NetworkPlayerController: Single entry point for network players - Auto-configures required components (CharacterAdapter, AnimatorSync) - Auto-detects optional modules (Traits, Inventory, Perception) - Ensures Character component stays ENABLED (critical for animation) - Supports owner/server/hybrid authority modes - NetworkModuleSyncBase: Abstract base class for module sync components - Unified dirty tracking and sync throttling - Authority pattern handling (owner/server/hybrid) - Priority-based sync rates (Low to Critical) - NetworkPlayerControllerEditor: Editor tools for setup/validation - Menu items for creating/migrating network players - Validation with detailed issue reporting - Quick fix for animation issues - Migration from legacy components - NetworkModuleSyncManager: Added Type-based registration methods - RegisterModule(Type, sync) for runtime registration - UnregisterModule(Type) for cleanup This provides a holistic solution integrating: - Motion sync (NetworkCharacterAdapter) - Animation sync (NetworkGameCreatorAnimator at 60Hz) - Stats/Traits sync (NetworkTraitsAdapter) - Inventory sync (NetworkInventorySync) - Perception sync (NetworkPerceptionSync) * feat: Add Visual Scripting RPC Manager for GameCreator integration Implements a comprehensive RPC system that fully integrates with GameCreator's visual scripting (Instructions/Conditions). ## Core Infrastructure (Phase 1) - VisualScriptingRPCManager: Central manager for VS-RPC integration - Type-safe RPC registration (no string-based names) - Unified execution context with Args support - Response/callback handling with timeout management - Statistics tracking (sent, received, succeeded, failed) - RPCInstructionBase: Template for RPC-capable Instructions - Built-in NetworkExecutionMode property - Auto-targeting (Self, Target, AllPlayers, Team, etc.) - Pack/Unpack payload methods for custom data - Authority enforcement (Anyone, OwnerOnly, ServerOnly) - RPCConditionBase: Template for network-aware Conditions - Offline mode handling (ReturnTrue/False/EvaluateLocally) - Network state helpers (IsServer, IsOwner, IsConnected) - VisualScriptingPayload: INetworkSerializable for RPC data - Args context preservation (Self/Target network IDs) - Custom data slots (strings, floats, ints, vectors) - Priority levels for batching integration ## RPC Instructions (Phase 2) - InstructionRPCBroadcast: Send message to all clients - InstructionRPCToPlayer: Send to specific player - InstructionRPCToServer: Server-authoritative requests - InstructionRPCSyncVariable: Sync global variables - InstructionRPCToNearby: Area-of-effect RPC by range - InstructionRPCExecuteActions: Run Actions asset remotely ## RPC Conditions (Phase 3) - ConditionRPCCanReach: Check if target is reachable - ConditionRPCHasAuthority: Check execution authority - ConditionRPCManagerReady: Check manager availability - ConditionRPCIsTargetType: Check local role matches target ## Response System (Phase 4) - RPCEventReceiver: Component for handling incoming RPCs - Message filtering by ID and sender - Multiple handler support per GameObject - Passes RPC data to Actions via Args - RPCResponseHandler: Request-response pattern component - OnSuccess/OnFailure/OnTimeout action branches - Retry support with configurable attempts - Timeout management ## Architecture Highlights - Zero string-based RPCs - all type-safe with InstructionId - Automatic integration with existing NetworkRPCBatcher - Visual Scripting First - every feature as Instruction/Condition - Server Authority Default - anti-cheat by design - Graceful Degradation - works in single-player mode --------- Co-authored-by: Claude <noreply@anthropic.com>
…ks (#9) ## Changes Made ### Root Level Cleanup (10 files moved) - Moved unauthorized root files to appropriate directories - Enforced zero-root-pollution policy from CLAUDE.md ### Documentation Consolidation - Archived 46 completion/status reports to _archive/status-reports/ - Archived analysis/diagnosis files to _archive/analysis/ - Organized guides into claudedocs/guides/ (28 files) - Removed redundant MCP_TOKEN_LIMITS_SUMMARY.md (duplicate of guide) ### New Consolidated Documentation - docs/DOCUMENTATION_INDEX.md - Master index with Foam wikilinks - docs/current/reference/NAMESPACE_REFERENCE.md - Namespace docs - claudedocs/README.md - Claudedocs directory index ### Foam Wikilinks Integration - Added [[wikilink]] references throughout documentation - Linked namespaces to relevant documentation - Created cross-references between docs/claudedocs ### Structure - Total files reduced from 370+ scattered to organized directories - Clear separation: active docs vs archived - Namespace-tagged documentation for easier navigation Co-authored-by: Claude <noreply@anthropic.com>
…t underground clipping
Problem: Network player characters were spawning with half their body
underground due to incorrect collider center settings.
Root cause: Both CharacterController and CapsuleCollider had
m_Center: {x:0, y:0, z:0} but for a character with height=2, the
center must be at {x:0, y:1, z:0} (half the height).
Changes:
- Player_Network.prefab: Set m_Center to (0,1,0) for both colliders
- NetworkPlayerDriverSetup.cs: Added FixColliderCenters() method that
runs at OnNetworkSpawn() to ensure correct center as a safety layer
The runtime safeguard ensures that even if someone modifies the prefab
incorrectly in the future, the center will be auto-corrected at spawn.
There was a problem hiding this comment.
Sorry @andreathar, your pull request is larger than the review limit of 500000 diff characters
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.
🔧 This PR fixes a critical multiplayer character clipping issue where network players were spawning half-underground due to incorrect collider center positions, and implements comprehensive improvements to animation synchronization, module management, and adds a complete power grid system for city-building games.
🔍 Detailed Analysis
Key Changes
Technical Implementation
sequenceDiagram participant P as Player Spawn participant N as NetworkPlayerDriverSetup participant C as CharacterController participant A as NetworkGameCreatorAnimator P->>N: OnNetworkSpawn() N->>N: FixColliderCenters() N->>C: Set center to (0,1,0) Note over C: Prevents underground clipping N->>A: Initialize 60Hz animation sync A->>A: InterpolateAnimatorState() Note over A: Smooth remote player animationImpact
Created with Palmier