Spatial Components #4

Open
opened 2023-03-12 14:25:08 +00:00 by TheCurle · 1 comment
Owner

Components come in two main varieties; those with spatial context, and those without.

Spatial Context constitutes:

  • A position in 3-dimensional space
  • A rotation in 3 axes
  • A size in 3 axes

An Entity with a Spatial Component is one that has a physical presence, but it may or may not be rendered.

For example, a static Mesh may have a Solid Spatial Component that gives it a position, rotation and scale, as well as a solid collider around its bounding box (which is set by its' scale).
It will be impossible to move into the object's bounding box, due to the Collider.

A trigger may have a Collider Spatial Component, with a position, rotation, scale, and a collider, but entry into the area will be allowed.
Some Game Event may be triggered by this happening.

Additionally, separate physical objects may be intrinisically linked together by way of Sockets.

Attachment Sockets may be considered "mounting points" for objects with multiple meshes that need to articulate around each other.
For example, a mechanical arm would have a Socket at each joint, and a hierarchy of Spatial Components for each subsequent part that allows a "bottom-up" sequence of independent transforms.

This way, the claws need not know how the base is rotated, or whether the arm is extended or not.

Components come in two main varieties; those with spatial context, and those without. Spatial Context constitutes: * A position in 3-dimensional space * A rotation in 3 axes * A size in 3 axes An Entity with a Spatial Component is one that has a physical presence, but it may or may not be rendered. For example, a static Mesh may have a Solid Spatial Component that gives it a position, rotation and scale, as well as a solid collider around its bounding box (which is set by its' scale). It will be impossible to move into the object's bounding box, due to the Collider. A trigger may have a Collider Spatial Component, with a position, rotation, scale, and a collider, but entry into the area will be allowed. Some Game Event may be triggered by this happening. Additionally, separate physical objects may be intrinisically linked together by way of Sockets. Attachment Sockets may be considered "mounting points" for objects with multiple meshes that need to articulate around each other. For example, a mechanical arm would have a Socket at each joint, and a hierarchy of Spatial Components for each subsequent part that allows a "bottom-up" sequence of independent transforms. This way, the claws need not know how the base is rotated, or whether the arm is extended or not.
TheCurle added this to the Entity-Component-System System. project 2023-03-12 14:25:09 +00:00
Author
Owner

A draft of the Spatial Component API is in cb545da50f.

A draft of the Spatial Component API is in cb545da50f.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TheCurle/umbra#4
No description provided.