Page 1 of 1

Enhance Surface.find_non_colliding_position

Posted: Sat Jun 18, 2016 11:31 pm
by Afforess
The current Surface.find_non_colliding_position is very useful for finding places to spawn entities, but there are times I want to find positions that won't collide, but also ignore checking collisions with certain types of entities (trees, I am looking at you!).

So if Surface.find_non_colliding_position could take a 5th parameter, an optional list of entity names to ignore when checking for a non-colliding position, it would be very useful.

Right now, the only workaround is to create a list of the entities, store their position/orientation/state, destroy them, call Surface.find_non_colliding_position and then re-create the entities ifif you don't spawn anything. Which is terrible for performance, and a lot of code.

Re: Enhance Surface.find_non_colliding_position

Posted: Sat Jun 25, 2016 6:05 am
by Simcra
I agree

Re: Enhance Surface.find_non_colliding_position

Posted: Sat Jun 25, 2016 6:56 am
by Rseding91
The entire collision system isn't built in any way that this could be added without completely reworking it and that's just not time that I want to spend for the little gains this might give.