Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
Creating a plane entity:

Create a plane entity with mesh and transform.

Create a plane entity with mesh and transform

Parameters
coreEngine core reference
infoParameters for creating the plane (width, depth, position, rotation, scale, subdivisionsX, subdivisionsZ)
Returns
Engine::Entity The created entity with mesh and transform
auto floor = Object::Helper::CreatePlane(core, { .width = 20.0f, .depth = 20.0f, .position = glm::vec3(0, 0, 0) });
floor.AddComponent<Physics::RigidBody>(core, Physics::RigidBody::CreateStatic());
decltype(auto) AddComponent(TComponent &&component)
Add a component to an entity.
Definition Entity.hpp:55
Engine::Entity CreatePlane(Engine::Core &core, CreatePlaneInfo info)
Definition CreateShape.cpp:35

a plane entity: