feat: add spherecollidor
This commit is contained in:
@@ -12,6 +12,7 @@ set(SRC_FILES
|
||||
|
||||
"src/Components/Physics/Rigidbody.cpp"
|
||||
"src/Components/Physics/BoxCollider.cpp"
|
||||
"src/Components/Physics/SphereCollider.cpp"
|
||||
|
||||
"src/Graphics/BindlessSetManager.cpp"
|
||||
"src/Graphics/Camera.cpp"
|
||||
|
||||
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <destrum/Components/Collider.h>
|
||||
#include <destrum/Components/Physics/Collider.h>
|
||||
|
||||
class SphereCollider final : public Collider {
|
||||
public:
|
||||
@@ -10,6 +10,8 @@ public:
|
||||
: Collider(owner)
|
||||
, m_Radius(radius) {}
|
||||
|
||||
void Update() override {}
|
||||
|
||||
[[nodiscard]] PhysicsShapeDesc BuildPhysicsShape() const override {
|
||||
return PhysicsShapeDesc::Sphere(m_Radius, m_CenterOffset, m_IsTrigger);
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#include <destrum/Components/Physics/SphereCollider.h>
|
||||
Reference in New Issue
Block a user