# Exposing UE5 TickPhysicsAsync Event

**URL:** <https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744>\
**Category:** World Creation\
**Tags:** unreal-engine, UE5-0, Physics\
**Created:** [January 11, 2022, 6:27pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744 "2022-01-11T18:27:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheRaucous](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/theraucous/32/249135_2.png) [@TheRaucous](https://forums.unrealengine.com/u/TheRaucous)\
**Post date:** [January 11, 2022, 6:27pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/1 "2022-01-11T18:27:11Z")

</div>

In UE5, the new Tick Physics Async option sets the physics simulation to run on its own thread and at fixed intervals - something that’s necessary for my current project. However, this leads to a further complication for the user where that, now, they can’t know when the physics simulation happens because its not part of the game thread or its tick event.

At a high level, the Tick event in unreal works exactly like Unity’s Update method. And Unity’s FixedUpdate method works like how I’m hoping UE5’s asynchronous “Physics Tick” could work.

I’ve done a bit of digging in the source code and, firstly, I understand very little of it (I’m a noob) but, as far as I can tell, there’s no Physics Tick event exposed anywhere for the user to access. I would think that for the asynchronous physics loop to be a thing at all, there must be a Physics Tick of some kind and, hopefully, one that can be made accessible to users.

After spending two months with unreal it’s something I cringe horribly at the thought of but, if this can’t be done, I will have to transition back to Unity 🤢

So… if anyone has any knowledge or advice on how to expose the Physics Tick to the user, I’d love to hear it!

Thanks 😀

---

<div class="post-metadata">

**Author:** ![TheRaucous](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/theraucous/32/249135_2.png) [@TheRaucous](https://forums.unrealengine.com/u/TheRaucous)\
**Post date:** [January 12, 2022, 2:46am UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/2 "2022-01-12T02:46:55Z")

</div>

I’ve been doing some more digging in the source code and the chaos vehicle implements asynchronous physics by using its own physics scene and, by the looks of it, manages that scene within the vehicle manager. Is that what it takes?!

… I might be in over my head.

---

<div class="post-metadata">

**Author:** ![Claigo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/claigo/32/610668_2.png) [@Claigo](https://forums.unrealengine.com/u/Claigo)\
**Post date:** [April 24, 2022, 8:19am UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/3 "2022-04-24T08:19:02Z")

</div>

If anyone is still interested in this, I’ve created a plugin based off what i saw in the Chaos Vehicles plugin to expose this event in blueprints (or c++)

> **[GitHub - Mr-Craig/AsyncTickPhysics](https://github.com/Mr-Craig/AsyncTickPhysics)**
>
> Contribute to Mr-Craig/AsyncTickPhysics development by creating an account on GitHub.

Just parent your pawn to the AsyncTickPawn, override the AsyncTick event and use the provided functions to apply the different forces. It can easily be modified to your needs aswell.

---

<div class="post-metadata">

**Author:** ![Jant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jant](https://forums.unrealengine.com/u/Jant)\
**Post date:** [April 30, 2022, 5:16pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/4 "2022-04-30T17:16:04Z")

</div>

_“If anyone is still interested in this”_  
Well, I’m sure a lot of people are interested in this! Thank you!

But at the moment I can’t get the Plugin to work.  
I’m getting an error:  
_The following modules are missing or built with a different engine version:_  
_AsyncTickPhysics-1.0.0_  
_Would you like to rebuild them now?_

After I click “yes” another error appears:  
_Could not be compiled. Try rebuilding from source manually._

I’m using UE 5.0.1

**EDIT:** I got it to work!  
I had to convert my UE5 project into C++ project (Tools \> Add new C++ class) and then Right Click my .uproject file and select Generate Visual studio project files.

Thank you very much for this plugin! @Claigo

---

<div class="post-metadata">

**Author:** ![Claigo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/claigo/32/610668_2.png) [@Claigo](https://forums.unrealengine.com/u/Claigo)\
**Post date:** [May 1, 2022, 10:48am UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/5 "2022-05-01T10:48:21Z")

</div>

Glad to hear it works 🙂 I’ve updated the readme if anyone else runs into that problem aswell.

---

<div class="post-metadata">

**Author:** ![Vinador](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vinador](https://forums.unrealengine.com/u/Vinador)\
**Post date:** [June 17, 2022, 9:18am UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/6 "2022-06-17T09:18:53Z")

</div>

Hey there,

I’ve managed to get the plugin running in UE5, but I’m not sure if it’s working as intended.

I seem to still get differences in the physics and forces depending on framerate. (bouncing and launching under 15fps) making me think that this tick isn’t running on the async thread. All the project settings are enabled for async physics and substepping etc.

Any idea what might be going on?

---

<div class="post-metadata">

**Author:** ![Claigo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/claigo/32/610668_2.png) [@Claigo](https://forums.unrealengine.com/u/Claigo)\
**Post date:** [June 17, 2022, 4:21pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/7 "2022-06-17T16:21:13Z")

</div>

Have you tried it without substepping? You only need to enable Tick Physics Async and set the fixed timestep to your desired value.

---

<div class="post-metadata">

**Author:** ![Vinador](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vinador](https://forums.unrealengine.com/u/Vinador)\
**Post date:** [June 17, 2022, 4:59pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/8 "2022-06-17T16:59:59Z")

</div>

I have, yep. It might just be Chaos not really being up to scratch that’s the issue.

In fact after doing some digging, we found that Substepping is essentially gone from the engine at this point, it just calls an empty function now.

---

<div class="post-metadata">

**Author:** ![Claigo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/claigo/32/610668_2.png) [@Claigo](https://forums.unrealengine.com/u/Claigo)\
**Post date:** [June 17, 2022, 5:26pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/9 "2022-06-17T17:26:53Z")

</div>

yeah i see that below like 20fps it becomes really unstable, i do think its just a chaos issue tbh since the plugin works exactly like the chaos vehicle plugin which implements the callback to the physics thread.

---

<div class="post-metadata">

**Author:** ![Vinador](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vinador](https://forums.unrealengine.com/u/Vinador)\
**Post date:** [June 27, 2022, 4:49pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/10 "2022-06-27T16:49:44Z")

</div>

Okay never mind what I said, it works perfectly.

I ran into a big bug with Chaos itself while I was trying to get it working the first time around!

This guys goes into detail on it here: [https://www.youtube.com/watch?v=TNPTyQUS63A](https://www.youtube.com/watch?v=TNPTyQUS63A)

What happens is that the Chaos vehicle system doesn’t able to wake rigid bodies automatically, to fix it you can add a ‘wake all bodies’ node on tick or throttle, whatever you need - Here’s the kicker, this bug seems to be in the underlying system, so it was affecting your plugin too!

So on my initial goes at getting the plugin working, my vehicle I was porting from UE4 was just sat there doing nothing. Now that I’ve managed to find this workaround it works even better than it did in UE4 where I was using a substepping plugin for BP.

Really great job here!

---

<div class="post-metadata">

**Author:** ![Claigo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/claigo/32/610668_2.png) [@Claigo](https://forums.unrealengine.com/u/Claigo)\
**Post date:** [June 30, 2022, 12:12am UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/11 "2022-06-30T00:12:21Z")

</div>

I’m glad you’ve been able to solve that issue and the plugin is working perfectly for you, I’ve updated the README with the fix if anyone else runs into that issue and hopefully its fixed in a later engine release 🙂

---

<div class="post-metadata">

**Author:** ![maslenok](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/maslenok/32/267079_2.png) [@maslenok](https://forums.unrealengine.com/u/maslenok)\
**Post date:** [September 27, 2022, 11:35am UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/13 "2022-09-27T11:35:22Z")

</div>

Thanks for your work! I migrate my ue4 project with machinery modelling toolkit to ue5 and replace all mmt functions. But i noticed that i cant acess physics linear/angualr velocities from async tick by standart functions. They only get values from standart event tick i think. That makes objects jittering when i try ty achieve target velocity by forces because calculations based on object velocity.

---

<div class="post-metadata">

**Author:** ![Claigo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/claigo/32/610668_2.png) [@Claigo](https://forums.unrealengine.com/u/Claigo)\
**Post date:** [September 27, 2022, 6:51pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/14 "2022-09-27T18:51:46Z")

</div>

I’ve updated the plugin and added 2 functions to get the Linear Velocity and Angular Velocity on the physics thread. Hopefully this fixes the issue for you!

---

<div class="post-metadata">

**Author:** ![maslenok](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/maslenok/32/267079_2.png) [@maslenok](https://forums.unrealengine.com/u/maslenok)\
**Post date:** [September 28, 2022, 6:57pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/15 "2022-09-28T18:57:51Z")

</div>

Thanks, now all works correct.

---

<div class="post-metadata">

**Author:** ![Buzzcore](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Buzzcore](https://forums.unrealengine.com/u/Buzzcore)\
**Post date:** [October 6, 2022, 7:21pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/16 "2022-10-06T19:21:00Z")

</div>

When I implement this and enable fixed tick in the project settings all physics seems to run slow and low gravity. Anyone else running into this issue?

EDIT: Also, when I create an async physics pawn, I can’t call any replicated events from it as these events can’t be called from a thread other than the game thread. Any work around?

---

<div class="post-metadata">

**Author:** ![Claigo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/claigo/32/610668_2.png) [@Claigo](https://forums.unrealengine.com/u/Claigo)\
**Post date:** [October 6, 2022, 8:26pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/17 "2022-10-06T20:26:28Z")

</div>

What have you set the fixed time step as? I’d recommend something like 0.01.

As for the problem with calling replicated events you could create a c++ class which would allow you to run tasks on the GameThread. This is something I made which you could use:

.h

```auto
#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintAsyncActionBase.h"
#include "AsyncTask.generated.h"

UENUM(BlueprintType)
enum class EAsyncNamedThreads : uint8
{
        RHIThread,
        GameThread,
        AnyThread,
        AnyHighPriorityThread,
        AnyNormalPriorityThread,
        AnyLowPriorityThread,
};

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnAsyncTaskDone);
/**
 * 
 */
UCLASS()
class TEST_API UAsyncTask : public UBlueprintAsyncActionBase
{
	GENERATED_BODY()

	UFUNCTION(BlueprintCallable)
		static UAsyncTask* NewAsyncTask(EAsyncNamedThreads InThread);

	UPROPERTY(BlueprintAssignable)
		FOnAsyncTaskDone Task;
		
private:
	virtual void Activate() override;

	EAsyncNamedThreads Thread;
};

```

.cpp

```auto
#include "AsyncTask.h"

UAsyncTask* UAsyncTask::NewAsyncTask(EAsyncNamedThreads InThread)
{
	UAsyncTask* NewTask = NewObject<UAsyncTask>();

	NewTask->Thread = InThread;

	return NewTask;
}

void UAsyncTask::Activate()
{
	ENamedThreads::Type NamedThread;

	switch(Thread)
	{
	case EAsyncNamedThreads::RHIThread:
		NamedThread = ENamedThreads::RHIThread;
		break;
	case EAsyncNamedThreads::GameThread:
		NamedThread = ENamedThreads::GameThread;
		break;
	case EAsyncNamedThreads::AnyThread:
		NamedThread = ENamedThreads::AnyThread;
		break;
	case EAsyncNamedThreads::AnyHighPriorityThread:
		NamedThread = ENamedThreads::AnyHiPriThreadHiPriTask;
		break;
	case EAsyncNamedThreads::AnyNormalPriorityThread:
		NamedThread = ENamedThreads::AnyNormalThreadHiPriTask;
		break;
	case EAsyncNamedThreads::AnyLowPriorityThread:
		NamedThread = ENamedThreads::AnyBackgroundHiPriTask;
		break;
	}
	AsyncTask(NamedThread, [this]
	{
		Task.Broadcast();
	});
}

```

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/5/b6537ea20b6f11bb57531c826fba9d523f6c4cc2.png)

---

<div class="post-metadata">

**Author:** ![HEILVH](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HEILVH](https://forums.unrealengine.com/u/HEILVH)\
**Post date:** [October 8, 2022, 4:10pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/18 "2022-10-08T16:10:17Z")

</div>

HI ! Really awesome plugin, this is exactly what i needed to make my own character physics !

I saw that you had added a function to get the velocity or the transform during AsyncTick, but how can I set it ? I need to get the velocity of my character (with ATP Get Linear Velocity) to make a smooth interp to another velocity. But Set Physics linear Velocity or Set World Location seems to be done in the EventTick (need ATP Set Linear Velocity and ATP Set Transform).

If my AsyncTickPawn has a high velocity and I try to freeze his location with Set World Location, my Actor jitter.

---

<div class="post-metadata">

**Author:** ![Claigo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/claigo/32/610668_2.png) [@Claigo](https://forums.unrealengine.com/u/Claigo)\
**Post date:** [October 8, 2022, 8:30pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/19 "2022-10-08T20:30:07Z")

</div>

I’ve added the following functions to the plugin:

```auto
ATP_SetLinearVelocity
ATP_SetAngularVelocityInRadians
ATP_SetAngularVelocityInDegrees
ATP_SetWorldLocation
ATP_SetWorldRotation
ATP_SetWorldLocationAndRotation

```

Hopefully this will help you with your project! 😀

---

<div class="post-metadata">

**Author:** ![HEILVH](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HEILVH](https://forums.unrealengine.com/u/HEILVH)\
**Post date:** [October 8, 2022, 8:55pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/20 "2022-10-08T20:55:23Z")

</div>

Bro… You are my hero, for real. You will allow me to do exactly what I have always dreamed to do in Unreal Engine ! Ultra Huge Thanks Pro Max !

---

<div class="post-metadata">

**Author:** ![HEILVH](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HEILVH](https://forums.unrealengine.com/u/HEILVH)\
**Post date:** [October 9, 2022, 7:15pm UTC](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744/21 "2022-10-09T19:15:13Z")

</div>

Hi ! After several test of your plugin, I noticed something really strange that is problematic in my case. When I have a hierarchy of multiples RigidBodys like a **sphere B** in another **sphere A** , problems happen.

If I try to Get the Transform of the **sphere A** or the **sphere B** , the Function always gives me the **sphere A** Location. The function only gives the Location of the parent, never that of the children.

But If I try to Set the _Location_ of the **sphere A** or the **sphere B** , the Function always set the _(right)_ Location but with the center of mass as pivot, not the parent pivot.

So if I try to set the Location of my **parent shpere A** with its own Location _(like to lock an axis for example)_, my spheres begin to make an infinite offset move every frames in the direction of “ **center of mass of hierarchy** to **sphere A** ”.

Is it possible to get and set the right location of the right target ? And if it’s not possible to handle differents childs datas, can we have the same pivot for both functions _(only parent or only center of mass)_ ?

Thanks !

[Next page](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744.md?page=2)
