Example Collider3D implementation
This commit is contained in:
1 parent
49272be17c
commit
fad58f1430
10 files changed
+104
-81
No files matched your search
@@ -10,6 +10,7 @@
|
||||
#include "scene/components/display/MeshHost.hpp"
|
||||
#include "scene/components/display/material/SimpleTexturedMaterial.hpp"
|
||||
#include "scene/components/example/ExampleSpin.hpp"
|
||||
#include "scene/components/physics/3d/CubeCollider.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class SimpleSpinningCubePrefab :
|
||||
@@ -31,8 +32,9 @@ namespace Dawn {
|
||||
void prefabInit(AssetManager *man) override {
|
||||
auto meshRenderer = this->addComponent<MeshRenderer>();
|
||||
meshHost = this->addComponent<MeshHost>();
|
||||
auto spinning = this->addComponent<ExampleSpin>();
|
||||
material = this->addComponent<SimpleTexturedMaterial>();
|
||||
auto spinning = this->addComponent<ExampleSpin>();
|
||||
auto collider = this->addComponent<CubeCollider>();
|
||||
|
||||
meshHost->mesh.createBuffers(CUBE_VERTICE_COUNT, CUBE_INDICE_COUNT);
|
||||
CubeMesh::buffer(&meshHost->mesh, glm::vec3(-0.5f, -0.5f, -0.5f), glm::vec3(1, 1, 1), 0, 0);
|
||||
|
||||
Reference in new issue
Block a user