The new node “Event Async Physics Tick” runs on its own separate thread, which improves physical determinism & predictability. For Unity users (like me), it’s the equivalent of (FixedUpdate), i.e. Fixed Time Step/Delta Time.
Requirement: I have a Pawn Class Blueprint, which acts as my character/player. This allows for custom collision and custom rotation for players/characters that do not adhere to being capsule-shaped, like: Squares, Rectangles, non-humanoid objects, etc.
Objective: I want to add force to it to move it, and customize its movement/jump with float curves, add custom gravity, and be deterministic no matter what the FPS/Framerate is.
What I have Achieved so far:
-
I have “Tick Physics Async” Under, Project Settings > Physics > Framerate, Set to ENABLED; And the “Async Fixed Time Step Size” = 1/60, or 0.016667.
-
I have “Async Physics Tick Enabled” Under, Root Blueprint (Self) > Physics, Set to ENABLED.
-
And finally: I have “Enable Gravity” Set to DISABLED, so I be able to debug pawn height when jumping.
This is just a simple Cube prototype acting as my player/character(Green):
- The default “Z” under Location is Set to 0.
These are the Blueprint nodes to jump:
Demonstrations:
Demonstration (FPS Uncapped):
FPS Capped (to 15 FPS)(Image):
Demonstration (FPS Capped to 15):
- Problem: We can indeed see that it’s deterministic, but the critical issue is the simulation time; in the 15 FPS version, it takes much longer to reach the same destination.
Now with the case of Curves using Timelines:
- Curve that leaps (0.4 secs):
- Timeline using it:
- Blueprint in action:
Demonstration (FPS Uncapped):
Demonstration (FPS Capped to 15):
- Problem: In addition to simulation time taking much longer in the 15 FPS version, we now lost determinism, which defeats the purpose of the Async function.
Questions: How to keep the Simulation Time the same regardless of the FPS, and with Determinism? Is it possible -yet- using Blueprints-only?
I noticed there’s a Pin called “Sim Seconds”, but I have no idea what it is and/or how to use it.