How to know if I can move an Actor to NewLocation before calling SetActorLocation(NewLocation)

Sweep does both:

No need to do it every frame. You Sweep once from where the actor is to where you want it to be. It will stop early if collision is detected. But that’s instantaneous. However you can use the resulting data and feed it into the timeline to animate it.

edit: quick example:

Essentially, sweep returns a bunch of data - you could play animation based on that.

This would not work for anything but a simple geo. Since this is a Tetris-like game, you’d have L-blocks, T-blocks and who knows what else, why not make a Starfish-block. Sweeping respects collider shapes:

Something a box / sphere trace cannot do.


Technically, you could move with sweep continuously but then it’s too late to do something with the data since we’ve already moved.


Also, The Tetris God

The Tetris God

3 Likes