This is an awesome feature! Using it will be able to enhance our Roblox Studio experience and help us efficiently build something like ruins for a building.
Thus instead of mainly using, print(âBug Foundâ) or warn(ââ) to find bugs. You can just look at the script.
Does this mean, I can pause everything, then edit a number in a script, unpause everything, it will continue with the change?
Would also be a good feature in production as a proper pausing mechanism on singleplayer games
Built-in decal wrapping please!
Thank you for making pausing like how it used to be a long time ago. It can be super useful, so it is very much appreciated!
i think the closest thing to this you could do is anchor the entire world, and then reset it back to how it was, although not sure how fast it would be as you need to loop through the entire workspace and anchor it, maybe you could use tag service to tag physical objects so you donât waste time looping through static objects like the map and stuff.
couldnât this be done by just dividing the deltaTime used to step physics in the engine by a number we provide?, or is it more complicated than that.
By âstepping physicsâ, I mean being able to control when physics updates occur on physically-simulated instances, and a way to specify how much time these updates should simulate.
What I have in mind is:
- A property like
ParticleEmitter.TimeScale
forBasePart
(perhapsBasePart.AssemblyPhysicsTimeScale
), a runtime-writeable positive number that acts as a âmultiplierâ for that assemblyâs physics updates.- With this, you would be able to specify any assembly to simulate twice as fast with a value of 2, or half as fast with a value of 0.5, or completely turn off its physics with a value of 0.
- This property replicates to clients when set on the server
- A method for
BasePart
(perhapsBasePart:StepAssemblyPhysics(deltaTime: number)
) that simulates a physics update, and allows the user to specify over how much time that update should represent.- The
deltaTime
passed in is multiplied byBasePart.AssemblyPhysicsTimeScale
inside the method. If the user wants to simulate an exact time, they can dividedeltaTime
by the property. - Using this along with
AssemblyPhysicsTimeScale = 0
, you can completely control how physics is simulated for this assembly. - This method essentially sets the positions and velocities of each part. Replication would be handled in the same way physics replications are usually handled.
- Note: Iâm not particularly sure if this method should affect parts that are anchored. I can see use cases for it, but they would be solved by un-anchoring the part before calling this method.
- The
- A Workspace property similar to
BasePart.AssemblyPhysicsTimeScale
(perhapsWorkspace.PhysicsTimeScale
), which provides control over the entire worldâs physics.-
BasePart
s are simulated at the speed of their assemblyâsAssemblyPhysicsTimeScale
property, multiplied byWorkspace.PhysicsTimeScale
.
-
- A Workspace method similar to
BasePart:StepAssemblyPhysics
(perhapsWorkspace:StepPhysics(deltaTime: number)
) that simulates a physics update for the entire world.- Does not step physics for anchored assemblies (if those exist).
I donât want to overstep this suggestion, but if possible, it would unlock even more use cases if the Workspace
methods suggested above could be extended to WorldModel
s.
I believe some large use cases would be:
- Setting
workspace.PhysicsTimeScale
(e.g. to 0.5) to slow down the entire world, like itâs done in this gem: Glass - Roblox- Setting the
AssemblyPhysicsTimeScale
of the playerâs character (e.g. to 2) to make the character move normally in a slowed-down world
- Setting the
- Setting
AssemblyPhysicsTimeScale
to slow down or stop player characters within a set distance, for a time-stop ability- Bonus points if we can tween the property to slow down time smoothly, instead of stopping it immediately
- Setting
AssemblyPhysicsTimeScale
to 0 to âturn offâ physics, while keeping collision detection (Touched events)- Simplifies the implementation of custom character controllers. We wouldnât have to fight Roblox when making our own platformer character physics (or resort to anchoring the character and running collision detection ourselves)
- Simulating particles that explode when touched with custom physics
- Using the potential
WorldModel:StepPhysics
method on a WorldModel inside a ViewportFrame to simulate 3D confetti in a victory screen UI- Could also be done with
BasePart:StepAssemblyPhysics
if the WorldModel contains some parts that should not be physically simulated
- Could also be done with
- An ability in a PvP combat game that creates âimpact framesâ which pause the world around the attacker and victim briefly, to intensify the power of the attack.
Notes:
- I donât believe being able to set a PhysicsTimeScale for individual parts (as opposed to entire assemblies) would be very useful (what would happen to a welded part simulated at half the time scale of its welded parts?). If anyone has ideas where that could be useful, please donât hesitate to reply!
- Since we can already control animation time stepping, I donât believe itâs necessary to make this feature control animations. Users can account for properly scaling animation speeds in their animation handling code. However, Iâd definitely love to see if anyone has ideas on how this could be automated alongside the physics APIs suggested above!
Absolutely astonishing update by Roblox here.
However it would be nice if you could change time scale in real time.
It would honestly benefit the community in such a positive way and I personally see no problem/reason not to integrate it in the future.
https://devforum.roblox.com/t/pausing-physics-in-studio-beta/2925013/30?u=basedmannn
I think this update, or something related to it is causing issues with Humanoids. I donât know for sure, but I used to never get any reports about humanoids being flung in my game, but suddenly today Iâve been getting tons of reports about it despite not changing anything in my game for a month or so.
Pretty sure this update will not affect anything in a real game, even if it did beta features only work in studio so it wouldnât affect your game until it comes out of beta.
It seems that breakpoints still pause rendering. Is this intentional, and is there anything I can do about it?
yes please add a timescale property to workspace. unity has had a feature like that for years. Unity - Scripting API: Time.timeScale
just make a workspace.TimeScale where 0 is stop time, 1 is full speed and 0.5 is half speed.
i needed something like this working on a superhot style game in the past.
Nice! That seems like a promising update, I wonder when you guys are gonna release it to real gamesâŚ
Is that update finally good?
- Yes
- No
0 voters
Can i pause the physics using script in future?
pausing physics in realtime games when?
actually no, scrap that, can we have a whole physics slowmotion
if Roblox is planning to add new features for in-game physics, I would like you to consider the need for rollbacks.
a major concern for many developers wanting to make competitive games is implementing server authoritative characters, and current solutions rely on custom physics because we have no way of doing this with our current api (e.g. Chickynoid).
great update the pause simulation will be fast by fixing physics in the object property and also scripts.
Awesome! Now we can pause physics :-o
This will be helpful!
I should use it for my game paralleized engineers itâs a sci-fi game so itâs cool if I can implement this to freeze the time including break NPC animations with the aerodynamic and wind if itâs fully frozen the time should be frozen but not all script and NPCs itâs a cool thing to implement but where ??? Iâm not telling