Files
Cortex_Engine/src/Engine.AI/Commands/SpawnModelCommand.cs
T
emil28092005 a90195c600 feat: optional physics in spawn_model MCP command
- SpawnModelCommand: added Physics bool property (default false)
- AiCommandProcessor.SpawnModel: when Physics=true, adds RigidBody.DynamicBox
  with half-extent = max(scale) * 0.5, mass = max(scale) * 2
- EngineMcpTools.SpawnModel: added 'physics' parameter (default false)
- Physics is optional — spawn without physics by default, enable when needed
- Physics bodies are initialized by the existing per-frame IsInitialized check
2026-06-18 22:16:13 +03:00

17 lines
548 B
C#

using System.Numerics;
namespace Engine.AI.Commands;
/// <summary>
/// Spawn a named entity with a Mesh loaded from a model file and a Transform.
/// </summary>
public sealed record SpawnModelCommand : AiCommand
{
public required string Name { get; init; }
public required string ModelPath { get; init; }
public Vector3 Position { get; init; } = Vector3.Zero;
public Quaternion Rotation { get; init; } = Quaternion.Identity;
public Vector3 Scale { get; init; } = Vector3.One;
public bool Physics { get; init; } = false;
}