Added basic triangle raycasting.

This commit is contained in:
2023-02-20 15:50:26 -08:00
parent 467f4d5a3f
commit fa4fa03260
7 changed files with 64 additions and 27 deletions

View File

@ -7,7 +7,7 @@
#include "scene/Scene.hpp"
#include "prefabs/SimpleSpinningCubePrefab.hpp"
#include "prefabs/TicTacToeTilePrefab.hpp"
#include "display/mesh/SphereMesh.hpp"
#include "display/mesh/TriangleMesh.hpp"
#include "scene/components/physics/3d/RayTester3D.hpp"
@ -31,6 +31,7 @@ namespace Dawn {
camera->orthoRight = s * ratio;
auto cube = SimpleSpinningCubePrefab::create(this);
TriangleMesh::createTriangleMesh(&cube->meshHost->mesh);
// SphereMesh::createSphere(&cube->meshHost->mesh, 1.0f, 16, 16);
auto tester = cube->addComponent<RayTester3D>();
tester->prefab = cube;