Why is BP rotation unstable and responding to mouse input? (when it shouldn't afaik)

Hello,

So I have set up a very simple rotation script for a pendulum type object, the asset is just a fairly simple model converted to BP, the event graph is below

And the timeline is here

As you can see it’s a very simple sine like curve, just looping positive to negative, some events for ticks are above the motion curve.

The problem I have is that the rocking motion is not stable, I would expect it simply to rock back and forward by the same amount as long as the thing is running but it doesn’t do that. It rocks back and forth in one range and then randomly flips around to another range… something like -2 to 2, -2 to 2 then -4 to 0, -4 to 0, then some other similar range.

I would expect this to happen if there was some bad math going on with a singularity causing a flip into some other range but this is a really simple animation curve that is told to loop and I don’t expect this to happen.

Also when moving the mouse over the screen while running a simulation of the animation the mouse movement changes the state of the rotation, if I don’t move the mouse the rotation range will change but quite slowly, if I move the mouse the state changes immediately and moves to a new range.

There is no input functionality added to the objects that I can see, I’ve not added any myself, just imported the geo and converted to BP and built that script. So afaik the mouse should not affect things at all.

Also the in and out tangents for the timeline curve are at zero and flat.

Anyone know what would be causing this? Cheers

Nobody?

This seems like a bug but I can’t see how one this simple would not have been caught by now… have I missed something?

The only thing that I can think of is that you use AddActorLocalRotation, which, since it is an addition, might accumulate errors over time. Try saving the initial rotation and then adding your curve value to that. You can then Set it each time instead of adding, this might reduce instabilities.

I had a weird physics glitch that moved my pawn when I set some totally unrelated variables. That was solved through a Blueprint recompile though. This is the only physics issue I have ever encountered in 5 months of heavy physics utilisation, so in general it is quite stable. Doesn’t help if it isn’t of course.

Thanks Pulp, that’s a good suggestion to help alleviate the problem.

I am quite puzzled as to why moving the mouse would increase the errors so drastically though… or why such a simple animation curve with looping zeroed end tangents would have an error like that, it seems like something that would propagate problems all over the place.

It makes me quite cautious about using Unreal in general