Why is BP rotation unstable and responding to mouse input? (when it shouldn't afaik)
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
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.
answered Mar 27 '17 at 01:41 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here