|
@@ -111,6 +111,7 @@ void RigidBody::RegisterObject(Context* context)
|
|
|
ACCESSOR_ATTRIBUTE(RigidBody, VAR_FLOAT, "Angular Rest Threshold", GetAngularRestThreshold, SetAngularRestThreshold, float, 0.01f, AM_DEFAULT);
|
|
ACCESSOR_ATTRIBUTE(RigidBody, VAR_FLOAT, "Angular Rest Threshold", GetAngularRestThreshold, SetAngularRestThreshold, float, 0.01f, AM_DEFAULT);
|
|
|
ATTRIBUTE(RigidBody, VAR_INT, "Collision Layer", collisionLayer_, DEFAULT_COLLISION_LAYER, AM_DEFAULT);
|
|
ATTRIBUTE(RigidBody, VAR_INT, "Collision Layer", collisionLayer_, DEFAULT_COLLISION_LAYER, AM_DEFAULT);
|
|
|
ATTRIBUTE(RigidBody, VAR_INT, "Collision Mask", collisionMask_, DEFAULT_COLLISION_MASK, AM_DEFAULT);
|
|
ATTRIBUTE(RigidBody, VAR_INT, "Collision Mask", collisionMask_, DEFAULT_COLLISION_MASK, AM_DEFAULT);
|
|
|
|
|
+ ACCESSOR_ATTRIBUTE(RigidBody, VAR_FLOAT, "Contact Threshold", GetContactProcessingThreshold, SetContactProcessingThreshold, float, BT_LARGE_FLOAT, AM_DEFAULT);
|
|
|
ACCESSOR_ATTRIBUTE(RigidBody, VAR_FLOAT, "CCD Radius", GetCcdRadius, SetCcdRadius, float, 0.0f, AM_DEFAULT);
|
|
ACCESSOR_ATTRIBUTE(RigidBody, VAR_FLOAT, "CCD Radius", GetCcdRadius, SetCcdRadius, float, 0.0f, AM_DEFAULT);
|
|
|
ACCESSOR_ATTRIBUTE(RigidBody, VAR_FLOAT, "CCD Motion Threshold", GetCcdMotionThreshold, SetCcdMotionThreshold, float, 0.0f, AM_DEFAULT);
|
|
ACCESSOR_ATTRIBUTE(RigidBody, VAR_FLOAT, "CCD Motion Threshold", GetCcdMotionThreshold, SetCcdMotionThreshold, float, 0.0f, AM_DEFAULT);
|
|
|
REF_ACCESSOR_ATTRIBUTE(RigidBody, VAR_BUFFER, "Network Angular Velocity", GetNetAngularVelocityAttr, SetNetAngularVelocityAttr, PODVector<unsigned char>, Variant::emptyBuffer, AM_NET | AM_LATESTDATA | AM_NOEDIT);
|
|
REF_ACCESSOR_ATTRIBUTE(RigidBody, VAR_BUFFER, "Network Angular Velocity", GetNetAngularVelocityAttr, SetNetAngularVelocityAttr, PODVector<unsigned char>, Variant::emptyBuffer, AM_NET | AM_LATESTDATA | AM_NOEDIT);
|
|
@@ -368,6 +369,15 @@ void RigidBody::SetRestitution(float restitution)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void RigidBody::SetContactProcessingThreshold(float threshold)
|
|
|
|
|
+{
|
|
|
|
|
+ if (body_)
|
|
|
|
|
+ {
|
|
|
|
|
+ body_->setContactProcessingThreshold(threshold);
|
|
|
|
|
+ MarkNetworkUpdate();
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void RigidBody::SetCcdRadius(float radius)
|
|
void RigidBody::SetCcdRadius(float radius)
|
|
|
{
|
|
{
|
|
|
radius = Max(radius, 0.0f);
|
|
radius = Max(radius, 0.0f);
|
|
@@ -627,6 +637,14 @@ float RigidBody::GetRestitution() const
|
|
|
return 0.0f;
|
|
return 0.0f;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+float RigidBody::GetContactProcessingThreshold() const
|
|
|
|
|
+{
|
|
|
|
|
+ if (body_)
|
|
|
|
|
+ return body_->getContactProcessingThreshold();
|
|
|
|
|
+ else
|
|
|
|
|
+ return 0.0f;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
float RigidBody::GetCcdRadius() const
|
|
float RigidBody::GetCcdRadius() const
|
|
|
{
|
|
{
|
|
|
if (body_)
|
|
if (body_)
|