Fixed bug with Bounciness failing to serialise

This commit is contained in:
Diren D Bharwani 2022-11-22 00:46:32 +08:00
parent f1ac689bb0
commit 23bae3d515
2 changed files with 7 additions and 3 deletions

View File

@ -359,6 +359,10 @@ RTTR_REGISTRATION
);
registration::class_<SHCollisionShape>("Collider")
.property("Position Offset", &SHCollisionShape::GetPositionOffset, &SHCollisionShape::SetPositionOffset)
.property("Rotation Offset", &SHCollisionShape::GetRotationOffset, &SHCollisionShape::SetRotationOffset) (metadata(META::angleInRad, true));
.property("IsTrigger" , &SHCollisionShape::IsTrigger , &SHCollisionShape::SetIsTrigger )
.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));
}

View File

@ -188,7 +188,7 @@ namespace YAML
if (node[Friction].IsDefined())
rhs.SetFriction(node[Friction].as<float>());
if (node[Bounciness].IsDefined())
rhs.SetBounciness(rhs.GetBounciness());
rhs.SetBounciness(node[Bounciness].as<float>());
if (node[Density].IsDefined())
rhs.SetDensity(node[Density].as<float>());
if (node[PositionOffset].IsDefined())