mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 05:20:06 +01:00
- Add options for physics ticks per second, time scale, max physics steps per frame
and physics interpolation to the 2D and 3D physics tests demos.
- Physics ticks per second are always multiplied by time scale so that
time scale does not affect the physics simulation quality.
- Enable 4× MSAA for better debug shape display. Remove meshes/lights as
the debug collision fill make these unnecessary.
- Switch to the Mobile rendering method in the 2D physics tests demo
to allow for 2D MSAA, as it's not implemented in Compatibility yet.
- Improve collision shapes color in the 2D and 3D physics tests demos
for better visibility. Each PhysicsBody type now has its own collision
shape color.
9 lines
242 B
GDScript
9 lines
242 B
GDScript
extends HBoxContainer
|
||
|
||
|
||
func _on_h_slider_value_changed(value: float) -> void:
|
||
value = maxf(0.1, value)
|
||
$Value.text = "%.1f×" % value
|
||
Engine.time_scale = value
|
||
Engine.physics_ticks_per_second = $"../TicksPerSecond/HSlider".value * value
|