Skip to content

Commit f157e1c

Browse files
ColRealProIgnisRBX
andauthored
Update RunService.yaml (#1079)
## Changes <!-- Please summarize your changes. --> I have changed the description of the `DeltaTimeSim` param to correctly say it is the time since the last simulation step instead of the last frame <!-- Please link to any applicable information (forum posts, bug reports, etc.). --> ```lua local dt1 = game:GetService("RunService").PreSimulation:Wait() local dt2 = game:GetService("RunService").PreSimulation:Wait() print(dt1, dt2) -- almost always outputs the same values, the physics simulation runs at a fixed 240hz afaik which would result in this ``` ## Checks By submitting your pull request for review, you agree to the following: - [X] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [X] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [X] To the best of my knowledge, all proposed changes are accurate. --------- Co-authored-by: IgnisRBX <[email protected]>
1 parent 59ec673 commit f157e1c

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

content/en-us/reference/engine/classes/RunService.yaml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,9 @@ events:
567567
Fires every frame, after the physics simulation has completed.
568568
description: |
569569
The `PostSimulation` event fires every frame, after the physics simulation
570-
has completed. The `deltaTimeSim` argument indicates the time that has
571-
elapsed since the previous frame.
570+
has completed. The `deltaTimeSim` argument indicates the time that the
571+
current frame has stepped the physics simulation, not accounting for
572+
physics throttling.
572573
573574
This event is useful for making final adjustments to the outcome of the
574575
simulation. Following this phase, the engine triggers the
@@ -579,7 +580,8 @@ events:
579580
type: double
580581
default:
581582
summary: |
582-
The time (in seconds) that has elapsed since the previous frame.
583+
The time (in seconds) that the current frame has stepped the physics
584+
simulation, not accounting for physics throttling.
583585
tags: []
584586
deprecation_message: ''
585587
security: None
@@ -592,7 +594,7 @@ events:
592594
description: |
593595
The `PreAnimation` event fires every frame, prior to the physics
594596
simulation but after rendering. The `deltaTimeSim` argument indicates the
595-
time that has elapsed since the previous frame.
597+
time that the current frame has stepped animations.
596598
597599
This event is useful for modifying animation objects, such as adjusting
598600
their speed or priority. Once the `PreAnimation` event is complete, the
@@ -607,7 +609,7 @@ events:
607609
type: double
608610
default:
609611
summary: |
610-
The time (in seconds) that has elapsed since the previous frame.
612+
The time (in seconds) that the current frame has stepped animations.
611613
tags: []
612614
deprecation_message: ''
613615
security: None
@@ -656,7 +658,8 @@ events:
656658
The `PreSimulation` event (replacement for
657659
`Class.RunService.Stepped|Stepped`) fires every frame, prior to the
658660
physics simulation. The `deltaTimeSim` argument indicates the time that
659-
has elapsed since the previous frame.
661+
the current frame will step the physics simulation, not accounting for
662+
physics throttling.
660663
661664
This event is useful for adjusting properties like velocity or forces just
662665
before they're applied as part of the simulation. The simulation then
@@ -669,7 +672,8 @@ events:
669672
type: double
670673
default:
671674
summary: |
672-
The time (in seconds) that has elapsed since the previous frame.
675+
The time (in seconds) that the current frame will step the physics
676+
simulation, not accounting for physics throttling.
673677
tags: []
674678
deprecation_message: ''
675679
security: None
@@ -679,7 +683,13 @@ events:
679683
- name: RunService.RenderStepped
680684
summary: |
681685
Fires every frame, prior to the frame being rendered.
682-
description: ''
686+
description: |
687+
Fires every frame, prior to the frame being rendered.
688+
689+
##### Migration Note
690+
691+
This event has been superseded by `Class.RunService.PreRender|PreRender`
692+
which should be used for new work.
683693
code_samples: []
684694
parameters:
685695
- name: deltaTime
@@ -688,17 +698,21 @@ events:
688698
summary: |
689699
The time (in seconds) that has elapsed since the previous frame.
690700
tags: []
691-
deprecation_message: |
692-
This event has been superseded by `Class.RunService.PreRender|PreRender`
693-
which should be used for new work.
701+
deprecation_message: ''
694702
security: None
695703
thread_safety: Unsafe
696704
capabilities: []
697705
writeCapabilities: []
698706
- name: RunService.Stepped
699707
summary: |
700708
Fires every frame, prior to the physics simulation.
701-
description: ''
709+
description: |
710+
Fires every frame, prior to the physics simulation.
711+
712+
##### Migration Note
713+
714+
This event has been superseded by `Class.RunService.PreSimulation|PreSimulation`
715+
which should be used for new work.
702716
code_samples: []
703717
parameters:
704718
- name: time
@@ -713,10 +727,7 @@ events:
713727
summary: |
714728
The time (in seconds) that has elapsed since the previous frame.
715729
tags: []
716-
deprecation_message: |
717-
This event has been superseded by
718-
`Class.RunService.PreSimulation|PreSimulation` which should be used for
719-
new work.
730+
deprecation_message: ''
720731
security: None
721732
thread_safety: Unsafe
722733
capabilities: []

0 commit comments

Comments
 (0)