Jump to content
ARMAzac

Find nearest road position?

Recommended Posts

Just want a way to spawn a vehicle on the nearest road, pointing in the direction of the road.. a very simple thing to do in Arma 3 but seems impossible in Reforger.

 

running a "QueryEntitiesBySphere" and looking for "RoadEntity" comes up with nothing (I believe these are only in the world editor)

Share this post


Link to post
Share on other sites

how and where exactly are you running QueryEntitiesBySphere?

It's not the case that I could help you much with your problem but I wan't to try out that method and learn it's usage...

 

Edit: after following the link in the below post it is done this way:

GetGame().GetWorld().QueryEntitiesBySphere(marker.GetOrigin(), m_iCityRange, CheckHouseAddToArray, FilterHouseEntities, EQueryEntitiesFlags.STATIC);

So it's a GetGame.GetWorld method.

 

Declaration of that method in BaseWorld.c:

proto external bool QueryEntitiesBySphere(vector center, float radius, QueryEntitiesCallback addEntity, QueryEntitiesCallback filterEntity = null, EQueryEntitiesFlags queryFlags = EQueryEntitiesFlags.ALL);

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×