Components

ECS components used by the engine's built-in systems.

Transform

Header: Core/include/Core/Components.h

struct Transform {
  glm::vec3 position{0.0f};
  glm::vec3 rotation{0.0f};  // Euler angles in degrees
  glm::vec3 scale{1.0f};
};

Controls an entity's position, rotation, and scale in world space. Rotation is applied around the model's bounding box center (not the origin), so models rotate visually in place.

FieldTypeDefaultDescription
positionglm::vec3{0.0f}World position
rotationglm::vec3{0.0f}Rotation in degrees (applied as X, Y, Z)
scaleglm::vec3{1.0f}Scale factor per axis

ModelRenderer

Header: Core/include/Core/Components.h

struct ModelRenderer {
  std::shared_ptr<Model> model;
  std::string modelPath;
};

Attaches a loaded Model to an entity. The engine's RenderSystem queries all entities with both Transform and ModelRenderer, computes a model matrix, and draws the model.

FieldTypeDescription
modelstd::shared_ptr<Model>Pointer to a loaded Model instance
modelPathstd::stringPath used to load the model (used for serialization)

For procedural primitives, modelPath uses the primitive:<type> convention (e.g. "primitive:box", "primitive:sphere").

Camera

Header: Core/include/Core/Components.h

enum class ProjectionType { Perspective, Orthographic };

struct Camera {
  float fov = 45.0f;
  float nearPlane = 0.1f;
  float farPlane = 1000.0f;
  ProjectionType projectionType = ProjectionType::Perspective;
  float orthoSize = 10.0f;
  bool isMain = false;
};

Defines a camera viewpoint. During play mode, the entity with isMain == true drives the rendering view.

FieldTypeDefaultDescription
fovfloat45.0Field of view in degrees
nearPlanefloat0.1Near clipping distance
farPlanefloat1000.0Far clipping distance
projectionTypeProjectionTypePerspectiveProjection mode
orthoSizefloat10.0Orthographic view height
isMainboolfalseActive camera during play mode

Animator

Header: Core/include/Core/Components.h

struct Animator {
  int clipIndex = 0;
  float time = 0.0f;
  float speed = 1.0f;
  bool playing = true;
  bool loop = true;
  std::vector<glm::mat4> boneMatrices;
};

Controls skeletal animation playback for entities with a skinned Model.

FieldTypeDefaultDescription
clipIndexint0Index into the model's animation clips
timefloat0.0Current playback time in seconds
speedfloat1.0Playback speed multiplier
playingbooltrueWhether the animation is playing
loopbooltrueWhether to loop at the end of the clip
boneMatricesstd::vector<glm::mat4>emptyOutput bone matrices (set by the system)

NativeScript

Header: Core/include/Core/Behavior.h

struct NativeScript {
  std::string behaviorName;
  std::unordered_map<std::string, std::string> properties;
  std::shared_ptr<Behavior> instance;  // runtime-only
  bool started = false;                // runtime-only
};

Attaches a behavior to an entity. The behaviorName is used to look up the factory in BehaviorRegistry. The properties map stores configurable parameters editable in the Inspector.

FieldTypeSerializedDescription
behaviorNamestd::stringYesName of the registered behavior
propertiesmap<string, string>YesUser-configurable key-value pairs
instanceshared_ptr<Behavior>NoRuntime behavior instance
startedboolNoWhether OnStart has been called

RigidBody

Header: Core/include/Core/PhysicsComponents.h

struct RigidBody {
  enum Type { Static = 0, Dynamic = 1, Kinematic = 2 };
  Type type = Dynamic;
  float mass = 1.0f;
  float linearDamping = 0.05f;
  float angularDamping = 0.05f;
  float restitution = 0.3f;
  float friction = 0.5f;
  float gravityFactor = 1.0f;
  bool freezePositionX = false, freezePositionY = false, freezePositionZ = false;
  bool freezeRotationX = false, freezeRotationY = false, freezeRotationZ = false;
};
FieldTypeDefaultDescription
typeTypeDynamicStatic, Dynamic, or Kinematic
massfloat1.0Mass in kg
linearDampingfloat0.05Linear velocity damping
angularDampingfloat0.05Angular velocity damping
restitutionfloat0.3Bounciness (0-1)
frictionfloat0.5Surface friction
gravityFactorfloat1.0Gravity multiplier (0 = no gravity)
freezePosition*boolfalseLock position on specific axes
freezeRotation*boolfalseLock rotation on specific axes

Collider

Header: Core/include/Core/PhysicsComponents.h

enum class ColliderShape { Box = 0, Sphere = 1, Capsule = 2 };

struct Collider {
  ColliderShape shape = ColliderShape::Box;
  float halfExtentX = 0.5f, halfExtentY = 0.5f, halfExtentZ = 0.5f;
  float radius = 0.5f;
  float halfHeight = 0.5f;
  float offsetX = 0.0f, offsetY = 0.0f, offsetZ = 0.0f;
  bool showOutline = false;
};
FieldTypeDefaultDescription
shapeColliderShapeBoxBox, Sphere, or Capsule
halfExtent*float0.5Half-size per axis (Box only)
radiusfloat0.5Radius (Sphere/Capsule)
halfHeightfloat0.5Half height (Capsule only)
offset*float0.0Offset from entity center
showOutlineboolfalseDebug wireframe visualization

PointLight

Header: Core/include/Core/Components.h

struct PointLight {
  float r = 1.0f, g = 1.0f, b = 1.0f;
  float intensity = 1.0f;
  float constant = 1.0f, linear = 0.09f, quadratic = 0.032f;
};

A point light source with distance attenuation. Up to 8 point lights are supported.

DirectionalLight

Header: Core/include/Core/Components.h

struct DirectionalLight {
  float r = 1.0f, g = 1.0f, b = 1.0f;
  float intensity = 1.0f;
};

A directional light (like sunlight). Direction is derived from the entity's Transform rotation. Up to 4 directional lights are supported.

SpotLight

Header: Core/include/Core/Components.h

struct SpotLight {
  float r = 1.0f, g = 1.0f, b = 1.0f;
  float intensity = 1.0f;
  float innerCutoff = 12.5f;
  float outerCutoff = 17.5f;
};

A spot light with inner and outer cone angles in degrees. Up to 4 spot lights are supported.

ParticleEmitter

Header: Core/include/Core/ParticleSystem.h

struct ParticleEmitter {
  float emitRate = 10.0f;
  float lifetime = 2.0f;
  float speed = 3.0f;
  float speedVariance = 1.0f;
  float size = 0.1f;
  float sizeEnd = 0.0f;
  glm::vec3 colorStart{1, 1, 1};
  glm::vec3 colorEnd{1, 1, 1};
  float gravity = -9.81f;
  int maxParticles = 256;
  bool enabled = true;
};
FieldTypeDefaultDescription
emitRatefloat10.0Particles emitted per second
lifetimefloat2.0Particle lifetime in seconds
speedfloat3.0Initial speed
speedVariancefloat1.0Speed randomization
sizefloat0.1Start size
sizeEndfloat0.0End size (lerps over lifetime)
colorStartglm::vec3{1, 1, 1}Start color (RGB 0-1)
colorEndglm::vec3{1, 1, 1}End color (RGB 0-1)
gravityfloat-9.81Gravity acceleration
maxParticlesint256Maximum particle pool size
enabledbooltrueWhether emitter is active

AudioSource

Header: Core/include/Core/AudioComponents.h

struct AudioSource {
  std::string clipPath;
  float volume = 1.0f;
  float pitch = 1.0f;
  bool loop = false;
  bool spatial = true;
  bool playOnAwake = false;
};
FieldTypeDefaultDescription
clipPathstd::string""Path to audio file
volumefloat1.0Volume (0-1)
pitchfloat1.0Pitch modifier
loopboolfalseLoop playback
spatialbooltrue3D spatial audio
playOnAwakeboolfalseAuto-play on start

AudioListener

Header: Core/include/Core/AudioComponents.h

struct AudioListener {};

Tag component -- attach to the entity that should "hear" 3D audio (typically the main camera).