SetActorLocation/GetActorLocation Inconsistency

Tenagra
Thu, 06 Feb 2020 00:09:39 +0000
Blueprint

I’m moving an Actor using the “VInterp to Constant” blueprint node to get the destination position. I can see that the exact vector (400, 300, 200) is being sent to SetActorLocation. Afterwards, I call GetActorLocation and the position doesn’t match.

LogBlueprintUserMessages: [location_drift_tester2_5] VInterp returns: X=400.000 Y=300.000 Z=200.000
LogBlueprintUserMessages: [location_drift_tester2_5] GetActorLocation returns: X=402.104 Y=299.044 Z=198.470

Blueprint: actor location jitter posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4

Notes:

This doesn’t seem to be a location caching issue or race condition with GetActorLocation, because the actor’s location stays at that incorrect value forever and can be verified in the world outliner.

Setting the actor to that position using a single call will put it in the correct location. The problem seems to be related to rapid updates

The actor is empty so it shouldn’t be related to collision or physics

Sweep/Teleport settings don’t seem to affect it

SetActorLocation’s return value is never false during this test

The location can end up more than 2cm off, which is a noticeable problem for my use-case.

5 posts - 1 participant