Custom MovementComponent with TemporalAA

Hey, I implemented a custom MovementComponent for a pawn that basically just calls SetActorLocationAndRotation every Tick,
with TemporalAA enabled this gives me horrible smearing when the object is in motion (I guess because the motion vectors are not set correctly).

similar problem in this thread TemporalAA & Motion Vectors

I have not been able to find any information about how to properly do this and the only option so far seems to be switching to fxaa which I would really like to avoid.

Any help would be much appreciated!

Does the same “horrible smearing” occur with any other MovementComponents? If not maybe just check out their implementation? For example taking a look at URotatingMovementComponent at the end of the Tick function MoveUpdatedComponent is called which in turn will call UpdatedComponent->MoveComponent if possible. So it could be something that SetActorLocationAndRotation and MoveComponent do something slightly different that causes this.

Are you teleporting the component? That could also be problematic.

Can’t remember if I ever solved the problem I was having (should really make more descriptive threads) - but CharacterMovementComponent also updates position and doesn’t set a ‘Velocity’. It does however, set the ‘Velocity’ property of the Movement Component itself, you could try that too.

Honestly though after thinking about it some more, I would have thought that TAA only calculates the ‘motion vectors’ in screen-space long after the scene has been rendered, and any actor information can’t be accessed.

Ghosting is still an artifact even with the default character I’ve found, hell it’s obvious even in the Kite demo. You can however ‘tune’ the TAA to have a faster response time with some console variables I think, that might help. Unfortunately, TAA just doesn’t play well with fast-moving objects - even more so if they’re small (think bullets etc.)