Fixed bug with Bounciness failing to serialise
This commit is contained in:
parent
f1ac689bb0
commit
23bae3d515
|
@ -359,6 +359,10 @@ RTTR_REGISTRATION
|
||||||
);
|
);
|
||||||
|
|
||||||
registration::class_<SHCollisionShape>("Collider")
|
registration::class_<SHCollisionShape>("Collider")
|
||||||
.property("Position Offset", &SHCollisionShape::GetPositionOffset, &SHCollisionShape::SetPositionOffset)
|
.property("IsTrigger" , &SHCollisionShape::IsTrigger , &SHCollisionShape::SetIsTrigger )
|
||||||
.property("Rotation Offset", &SHCollisionShape::GetRotationOffset, &SHCollisionShape::SetRotationOffset) (metadata(META::angleInRad, true));
|
.property("Friction" , &SHCollisionShape::GetFriction , &SHCollisionShape::SetFriction )
|
||||||
|
.property("Bounciness" , &SHCollisionShape::GetBounciness , &SHCollisionShape::SetBounciness )
|
||||||
|
.property("Density" , &SHCollisionShape::GetDensity , &SHCollisionShape::SetDensity )
|
||||||
|
.property("Position Offset" , &SHCollisionShape::GetPositionOffset, &SHCollisionShape::SetPositionOffset)
|
||||||
|
.property("Rotation Offset" , &SHCollisionShape::GetRotationOffset, &SHCollisionShape::SetRotationOffset) (metadata(META::angleInRad, true));
|
||||||
}
|
}
|
|
@ -188,7 +188,7 @@ namespace YAML
|
||||||
if (node[Friction].IsDefined())
|
if (node[Friction].IsDefined())
|
||||||
rhs.SetFriction(node[Friction].as<float>());
|
rhs.SetFriction(node[Friction].as<float>());
|
||||||
if (node[Bounciness].IsDefined())
|
if (node[Bounciness].IsDefined())
|
||||||
rhs.SetBounciness(rhs.GetBounciness());
|
rhs.SetBounciness(node[Bounciness].as<float>());
|
||||||
if (node[Density].IsDefined())
|
if (node[Density].IsDefined())
|
||||||
rhs.SetDensity(node[Density].as<float>());
|
rhs.SetDensity(node[Density].as<float>());
|
||||||
if (node[PositionOffset].IsDefined())
|
if (node[PositionOffset].IsDefined())
|
||||||
|
|
Loading…
Reference in New Issue