#What's the most efficient way to get all

1 messages · Page 1 of 1 (latest)

tropic sleet
#

Define "area"?

next kindle
#

Well, right now it's a box collider but if there's a better way to define an area for this purpose I'm all ears

tropic sleet
#

I'm mostly interested in what you call an area. An area can be a whole town, or a 5m² region.

#

Do Physics Actors enter and exit the Area?

next kindle
#

YES that's the key point

tropic sleet
#

In theory you will probably want to have an Array of PhysicsActors that you maintain

#

A boxCollider can be used via Overlap events (Begin and End)

#

To add them to an array

next kindle
#

Overlap is a good idea

tropic sleet
#

Ultimately, you want to update that list only when a new element is actually added/removed, instead of figuring out what is in it every frame.

next kindle
#

The idea here is to simulate gravity to throw all objects in a room in a certain direction. in THEORY this should be for an entire building-sized area, but actually I'll probably subdivide the building so later rooms aren't a mess when the player is there

tropic sleet
#

You can loop the list every frame fwiw

tropic sleet