Create a cube entity with mesh and transform.
Create a cube entity with mesh and transformThis is a high-level helper that creates an entity with:
- Mesh component (cube geometry)
- Transform component (position, rotation, scale)
- Parameters
-
| core | Engine core reference |
| info | Parameters for creating the cube (size, position, rotation, scale) |
- Returns
- Engine::Entity The created entity with mesh and transform
cube.
AddComponent<Physics::RigidBody>(core, Physics::RigidBody::CreateDynamic());
decltype(auto) AddComponent(TComponent &&component)
Add a component to an entity.
Definition Entity.hpp:55
Engine::Entity CreateCube(Engine::Core &core, CreateCubeInfo info)
Definition CreateShape.cpp:9
a cube entity: