Physics2D: Handle kinematic objects properly
This commit is contained in:
@@ -44,13 +44,14 @@ namespace Nz
|
||||
const Collider2DRef& GetGeom() const;
|
||||
cpBody* GetHandle() const;
|
||||
float GetMass() const;
|
||||
float GetMomentOfInertia() const;
|
||||
Vector2f GetPosition() const;
|
||||
float GetRotation() const;
|
||||
void* GetUserdata() const;
|
||||
Vector2f GetVelocity() const;
|
||||
PhysWorld2D* GetWorld() const;
|
||||
|
||||
bool IsMoveable() const;
|
||||
bool IsKinematic() const;
|
||||
bool IsSleeping() const;
|
||||
|
||||
void SetAngularVelocity(float angularVelocity);
|
||||
@@ -70,7 +71,8 @@ namespace Nz
|
||||
NazaraSignal(OnRigidBody2DRelease, RigidBody2D* /*rigidBody*/);
|
||||
|
||||
private:
|
||||
void Create(float mass = 1.f, float moment = 1.f);
|
||||
void CopyBodyData(cpBody* body);
|
||||
cpBody* Create(float mass = 1.f, float moment = 1.f);
|
||||
void Destroy();
|
||||
|
||||
std::vector<cpShape*> m_shapes;
|
||||
|
||||
Reference in New Issue
Block a user