fix: alot of stuff changed. Mostly bugfixxes / architechture changes
This commit is contained in:
@@ -8,9 +8,12 @@ class SphereCollider final : public Collider {
|
||||
public:
|
||||
explicit SphereCollider(GameObject& owner, float radius = 0.5f)
|
||||
: Collider(owner)
|
||||
, m_Radius(radius) {}
|
||||
, m_Radius(std::max(radius, 0.0001f)) {}
|
||||
|
||||
void Update() override {}
|
||||
void Update(float dt) override {}
|
||||
|
||||
nlohmann::json Serialize() const override;
|
||||
void Deserialize(const nlohmann::json& data) override;
|
||||
std::string GetTypeName() const override
|
||||
{
|
||||
return "SphereCollider";
|
||||
@@ -25,7 +28,8 @@ public:
|
||||
}
|
||||
|
||||
void SetRadius(float radius) {
|
||||
m_Radius = std::max(radius, 0.0f);
|
||||
m_Radius = std::max(radius, 0.0001f);
|
||||
NotifyPhysicsChanged();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user