- 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
17 lines
548 B
C#
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;
|
|
}
|