You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
SoftBody3D: Add a property for scaling rest lengths of edge constraints
This commit is contained in:
@@ -1126,6 +1126,20 @@ real_t JoltPhysicsServer3D::soft_body_get_linear_stiffness(RID p_body) const {
|
||||
return (real_t)body->get_stiffness_coefficient();
|
||||
}
|
||||
|
||||
void JoltPhysicsServer3D::soft_body_set_shrinking_factor(RID p_body, real_t p_shrinking_factor) {
|
||||
JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
|
||||
ERR_FAIL_NULL(body);
|
||||
|
||||
return body->set_shrinking_factor((float)p_shrinking_factor);
|
||||
}
|
||||
|
||||
real_t JoltPhysicsServer3D::soft_body_get_shrinking_factor(RID p_body) const {
|
||||
JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
|
||||
ERR_FAIL_NULL_V(body, 0.0);
|
||||
|
||||
return (real_t)body->get_shrinking_factor();
|
||||
}
|
||||
|
||||
void JoltPhysicsServer3D::soft_body_set_pressure_coefficient(RID p_body, real_t p_coefficient) {
|
||||
JoltSoftBody3D *body = soft_body_owner.get_or_null(p_body);
|
||||
ERR_FAIL_NULL(body);
|
||||
|
||||
Reference in New Issue
Block a user