mirror of
https://github.com/godotengine/godot.git
synced 2025-04-25 01:48:08 +08:00
Merge pull request #101237 from mihe/jolt/cache-bounce-velocity
Cache value of Jolt Physics project setting `bounce_velocity_threshold`
This commit is contained in:
commit
0c763602f9
@ -2464,6 +2464,7 @@
|
||||
</member>
|
||||
<member name="physics/jolt_physics_3d/simulation/bounce_velocity_threshold" type="float" setter="" getter="" default="1.0">
|
||||
The minimum velocity needed before a collision can be bouncy, in meters per second.
|
||||
[b]Note:[/b] This setting will only be read once during the lifetime of the application.
|
||||
</member>
|
||||
<member name="physics/jolt_physics_3d/simulation/continuous_cd_max_penetration" type="float" setter="" getter="" default="0.25">
|
||||
Fraction of a body's inner radius that may penetrate another body while using continuous collision detection.
|
||||
|
@ -119,7 +119,8 @@ float JoltProjectSettings::get_soft_body_point_radius() {
|
||||
}
|
||||
|
||||
float JoltProjectSettings::get_bounce_velocity_threshold() {
|
||||
return GLOBAL_GET("physics/jolt_physics_3d/simulation/bounce_velocity_threshold");
|
||||
static const float value = GLOBAL_GET("physics/jolt_physics_3d/simulation/bounce_velocity_threshold");
|
||||
return value;
|
||||
}
|
||||
|
||||
bool JoltProjectSettings::is_sleep_allowed() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user