add raycasting in level
This commit is contained in:
@@ -3,11 +3,20 @@
|
||||
#include <NazaraEditor/Core/Config.hpp>
|
||||
|
||||
#include <Nazara/Core/EnttWorld.hpp>
|
||||
#include <Nazara/Math/Ray.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class EditorBaseApplication;
|
||||
|
||||
struct RaycastHit
|
||||
{
|
||||
entt::handle entity;
|
||||
|
||||
Nz::Vector3f position;
|
||||
float distance;
|
||||
};
|
||||
|
||||
class NAZARAEDITOR_CORE_API Level final
|
||||
{
|
||||
public:
|
||||
@@ -21,6 +30,9 @@ namespace Nz
|
||||
entt::handle CreateEntity();
|
||||
bool CreateNewLevel();
|
||||
|
||||
// This is slow af
|
||||
std::vector<RaycastHit> Raycast(const Nz::Rayf& ray);
|
||||
|
||||
protected:
|
||||
EditorBaseApplication* m_application;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user