I have noticed that if the rotation speed of an actor is reduced enough, the actor does not rotates despite the fact that the rotation speed is not zero.
For me this speed is 0.005787 degrees per second (the speed is gotten with ‘GetPhysicsAngularVelocityInDegrees()’ function).
The question is: can we define this minimum speed somwhere?
I think that this is not connected with component sleeping mechanism at all.
The main difference is that if I force (via settings) my component to actually sleep and then I set this component’s rotation speed, this rotation speed is subsequently zeroed by the engine (usually it takes about 3 frames).
But in the present situation the speed I have set can continuously be read by use of ‘GetPhysicsAngularVelocityInDegrees()’ function. It is not zeroed.
Moreover the ‘RigidBodyIsAwake()’ function returns ‘true’ if called for the component.
Out of sheer curiosity, since I’m fresh out of ideas , how is the reduction done? Is there something funky going on - perhaps you’ve employed some physics control components?
If your Cube twitches instead of rotating smoothly, then we probably observe the same effect here.
To check it you may output Forward or Upward (or Right) vector coordinates somewhere (to file or to the screen) and check if (or how often) they change.
EDIT: I assume that your Cube has Physics turned on…
You can’t see the actual rotation of the mesh with a naked eye. If I give it a long enough arm, though, I can observe that instead. Here’s the captured “movement”:
At this rate we’re talking some substepping or loss of precision. So yes, it does accumulate values and no, it’s far from ideal.
If I remember correctly, we had access to substepping when this was still pure PhysX. Not anymore. Scrub through this:
See if you can find anything that could be adjusted. There’s a bunch of entries that look sus:
Like a planet-planet sized stuff? Yeah, no, I don’t think so. This would be pretty much faked everywhere bar NASA’s Mars mission. I read their paper on using ISS propulsion module last year. 90%+ went over my head, ofc. What did stick made me realise the whole thing stays in orbit due to brute-force multiple redundancy error correcting controllers. And they do not even need to worry about frame-time…
There are improvements coming to double precision for large worlds and Chaos is very actively being worked on. Chances are what you’re after can be achieved or you can get closer. Providing I understand correctly what is needed here, I can be of no help, sadly.
I still have flashback after trying to spin a 4km disc in UE4 and have a Pawn Movement Comp respect that. Folks have issues rolling a ball on a flat surface without it getting all bumpy.
Further investigations of the problem have shown that in Unreal there is the ‘minimum rotation step’.
If the object is rotated less, it does not rotate in the world, however the rotation will be accumulated in object’s Transform matrix.
I have checked doing matrix calculations myself and then applying the resulting rotation matrix to the object - the results are the same (or at least very similar: for big objects ‘stepping’ can be clearly visible).
I wonder: maybe there is some switch or setting or flag hidden somewhere in the engine to increase the precision of this ‘rotation step’?
For those of you, who also encounter this problem… The solution for the first part of it is here:
For me - unfortunatelly - that meant the need to migrate my project to the newer version of Unreal (in the past I used 5.0 and this solution is available from 5.1).
I have migrated and now my planet can rotate veeeeery slowly (like planets often do) and it still looks nice, when you are flying low over the surface or - for example - aproaching landing.
BUT
I have come into next part of the problem: Planet is rotating, but it has its physics turned off…
But in some situations I have to slightly adjust rotation of objects which have their physics turned on…
And I see that again there is the minimum amount by which I can rotate such an object - if I rotate it any slighter, it just does not rotate at all.