Download

Random Motion within a Volume

Hello Folks,

I’m trying to make an Actor to move randomly (like a fake brownian motion). It works well with the attached Blue Print, but I would like to constrain it to a Volume. (Getting the Actor’s current location adding some random vectors and feeding it back with a SetActorLocation node)

I don’t want completly random jumping. (I already did that with Random Point In Bounding Box - but it’s still not good).
I would like to achieve something similiar: Shaken granular material in "quasi-two-dimensions" (zoom) - YouTube

But when it reaches the bounds of a volume, it turns back and never leaves the volume.

And I also do not want collisions. (If the solution will include this I will be happy but not mission critical)

I think one way to achieve this to get a random point within a bounding box (included Blueprint node) and somehow (don’t know how) add a small vector to the current location what is towards the random position. But I can’t figure out the exact way.

I appreciate any help because I don’t get it right. How to check wether the new position inside a Volume? And if not how to put it back?

Thanks,
Robert

3671e0e3f625a28ee1fd1d9d41477337830f093d.png