Physics control component: how to lerp from simulated to kinematic?

For performance and stability reasons, I don’t want my physics control component to be enabled all the time. So, after a timer, I disable it (all controls to kinematic). Bug it looks pretty ugly as this is a brutal transition.

lerpProblem

I am looking for a way to lerp all controls from simulated to kinematic. With physical animation, you could use a blend physics weight node to do just that.

I tried it along Set Control Use Skeletal animation, but it doesn’t work. Also, I tried to increase World space strength with no luck.


How could be achieved a smooth transition with physics control component?

you can handle 3 bodies: one is the physical body, the second is the non physical body, both of them are not visible, and 3rd a cometic body that is the one you see. this one has not physics, you just lerp it from physics transform to non physics transform.

or just two bodies (physical and cosmetic) and a scene component linked to the ant (the non physic body is just the one linked to the ant where you want to look like is holding it) in this case you lerp transform from physical to scene component

also when you finished transition from simulated to no simulated, you can turn set simulated OFF to the physical one for optimize

1 Like

I have this excact issue. Can you show somehow to do it with the 3 bodies?

I’m curious to know the hierarchy and which nodes to use to lerp the animation transform: on every bone? Or on physics controls?
Also, we will have twice bodies that run animation, and tick code to sync transforms, will it not be performance heavy ?

In addition, I found another error is when switching to kinematic, it breaks the current animation.
KinematicBreaksAnim

edit: first problem I encounter is that the meshes are using the same animBP but are not synchronized (because I have some random idle playing).

I misunderstood your problem…I thought your problem where picking up physical bodies but your issue is related to animated skeletal to ragdoll nmode to animated again, right?

Yes, it is transition from simulated to kinematic and so on for npc using physics control component.

I am in UE5.2 and I was reading this on 5.3 release notes:

Added support for using Physics Blend Weight alongside Physics Control Component.

That may be precisely what I’m looking to achieve (see OP). I gotta migrate my project to 5.3 to try it.

1 Like

Migrating to 5.3 fixed the animation-stopping bug. But the blend weight lerping is still not working: I got no bone movement and then suddenly it got back to not simulated place.

The best way I’ve found is to lerp up the parent control so it strengthen the bones to max before switching to kinematic.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.