Components
ECS components used by the engine's built-in systems.
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.
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.
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.
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.
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.
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;
};
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;
};
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;
};
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;
};
AudioListener
Header: Core/include/Core/AudioComponents.h
Tag component -- attach to the entity that should "hear" 3D audio (typically the main camera).