SDK/PhysicsComponent2D: Allow massless bodies
This commit is contained in:
@@ -215,6 +215,7 @@ Nazara Development Kit:
|
|||||||
- Added experimental BoxLayout class
|
- Added experimental BoxLayout class
|
||||||
- RenderSystem now resolve skinning before render
|
- RenderSystem now resolve skinning before render
|
||||||
- EntityOwner constructor taking a Entity* is no longer explicit
|
- EntityOwner constructor taking a Entity* is no longer explicit
|
||||||
|
- PhysicsComponent2D now allows massless bodies (zero mass)
|
||||||
|
|
||||||
# 0.4:
|
# 0.4:
|
||||||
|
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ namespace Ndk
|
|||||||
inline void PhysicsComponent2D::SetMass(float mass)
|
inline void PhysicsComponent2D::SetMass(float mass)
|
||||||
{
|
{
|
||||||
NazaraAssert(m_object, "Invalid physics object");
|
NazaraAssert(m_object, "Invalid physics object");
|
||||||
NazaraAssert(mass > 0.f, "Mass should be positive");
|
NazaraAssert(mass >= 0.f, "Mass should be positive");
|
||||||
|
|
||||||
m_object->SetMass(mass);
|
m_object->SetMass(mass);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user