Set rotation affecting physics

When using set rotation inside scene or actor component bp the target actor(with simulation on) physics is affected. Physics simulation like the gravity, or adding force seems to be stopped when the actor is rotating. Goes back after the rotation is finished.

Set rotation does work correctly when directly inside the actor bp. Also works properly when actor physics is off, while gravity is on.

Hi kurosu143,

I attempted to reproduce this but I haven’t had any luck. Could you provide a small test project that shows the issue?

link text

Here are the two BP, pawn BP and scene component BP, just connect one node vice versa.

Please bear with me if I’m misunderstanding, but this is the results I get with either node plugged in.

110317-physicsrotate01.gif

Is it possible this is confined to your project? Have you tried reproducing it in a new project?

I created it in a blank project.

I’m not sure if that is a 60 fps gif. So are you getting continuous or laggy fall from both bp?

Mine gets a laggy fall from component, and continuous fall from actor.

It gets worse if you add any function(like print string) before the set actor rotation in the component bp. The physics just stops.

110357-componentsetrotwithprintstring.gif

No, there isn’t any sort of lagging on my end. Also, adding the function (print string) before the SetActorRotation doesn’t seem to effect anything either.

Can you create a blank project that shows the issue and upload it here? Something that all I would need to do is press Play/Simulate to see what you are seeing.

I’m wondering if what you are seeing could be hardware related because Tick is directly related to FPS. Could you also include your Dxdiag info? If you are on Windows, just go to the Start menu and type ‘dxdiag’ into the search bar. Open the file and then click ‘Save All Information’. Post that text file here.

link text

I also tried it on 4.12 and it happens there too.

Ahh, okay. I see what you are talking about now. The project I had added your assets to had Substepping turned on from a previous test for something else. That was adjusting for the lag.

I’m still investigating this and I’ll post back here when I have additional info.

Hi kurosu143,

I created JIRA UE-37270 for the issue. We will be investigating further. You can follow that link to the Public Tracker so monitor it’s status and feel free to vote on the issue.

As a workaround, you could do what I was unintentionally doing when I was first testing and that’s to turn Sub-stepping on. You will have to play around with the values to see what works for you.

Another option would be to not place the rotation functionality inside of a SceneComponent class. The issues doesn’t seem to be a problem in an Actor class blueprint.

Cheers,

TJ

Was there a regression on this? I am seeing similar behavior in 5.4 where calling SetActorRotation seems to prevent physics from ticking on that actor for that frame.

Looking at the code, it looks like SetWorldRotation is internally calling SetRelativeLocationAndRotation and passing the current location in for the location component, which I assume is overriding any physics-based translation that is supposed to happen during that frame?

I have isolated this issue to the Async Physics Tick option. It behaves correctly with this option off.