Page MenuHomeFeedback Tracker

AI walk through setPos'd static objects [repro mission]
Closed, ResolvedPublic

Description

Bug applicable to any static objects (walls, bunker, etc.) :

If we modify the object's position (e.g. setPos) after its creation, the AI will walk through it.

The bug can be reproduced by using the command setPos, or by using attachTo-then-detach. {F24272}

Details

Legacy ID
1042081839
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
AI Pathfinding / Motion
Steps To Reproduce

There is a repro mission attached to the ticket.

The mission creates a long wall in front of the player.
You got 2 AIs in your team to test the bug (use camera + space to teleport, or give orders to AIs).

You have three methods to make the wall (action menu) :

  • "create vehicle" : spawns new objects at the good position -> no bug
  • "set pos" or "attach-detach" : update the positions of the already existing objects -> BUG

You can set different types of objects to make the wall (action menu).

Event Timeline

madbull edited Steps To Reproduce. (Show Details)Jul 9 2014, 9:53 AM
madbull edited Additional Information. (Show Details)
madbull set Category to AI Pathfinding / Motion.
madbull set Reproducibility to Always.
madbull set Severity to None.
madbull set Resolution to Fixed.
madbull set Legacy ID to 1042081839.May 7 2016, 6:55 PM
madbull edited a custom field.

Hello oukej,

To help us planning some coming community's development : what does mean this status "reviewed" ?
It means "will not be solved" ?

Thanks.

oukej added a comment.Jul 25 2014, 1:48 PM

Hey madbull! No worries. It means it has been checked, successfully reproduced and transferred into our internal pipelines.

Now, you may ask what is the difference between "reviewed" and "acknowledged" ;) Acknowledgement may usually (not always) suggest it's been recognized by a dev as a valid issue we'd like to do something about (votes/popularity also plays a role even though it may not always seem so ;)). An update of FT guidelines is planned soon - that should make all these things more clear.

As for this issue - it's still unsure - setPos'd objects work correctly if command is used in the mission init, so it's also a question of the command's use definition/limits.

iac. thanks a lot for the feedback and we'll try to keep you informed about any decisions or ev. fixes!

Hello oukej,

Thanks for the clarification about "reviewed" and "acknowledged" :) It was not clear for me.

About the reported issue, here is a suggestion :

I assume there is an engine's function that update a data structure which contains all the
"Static" obstacles for AI path finding.
As you said, this function is probably called after the mission init to take into account the setPos in object's init lines.

If I'm right, maybe adding a SQF scripting command named "commitStaticObstacles", which calls the engine's function should be a very nice solution :)
So we can choose (on SQF-side) to update the data structure when the update should be needed.
(The command has local effect and takes no argument.)

Regards

Here is a method to force the Arma engine to take into account de setPos'd static object for the AI pathfinding :

It is a code to be executed on each computer. It creates a helipad at the exact same position than the setPos'd object.
It is a trick to force the Arma engine to run its routine which updates the obstacles for AI pathfinding.
I tested it long time and it works, even in multiplayer.

// Force to take into account the obstacles for AI pathfinding (to be executed on each computer)
if (_object isKindOf "Static") then
{
_object spawn
{

		/*
		 * First helipad is to get the exact reference position of the object.
		 * 
		 * Second helipad will cause the execution of the engine's routine
		 * updating the pathfinding obstacles for this position.
		 */
		private ["_helipad1", "_helipad2"];
		sleep 0.7;
		_helipad1 = "Land_HelipadEmpty_F" createVehicleLocal (getPosATL _this);
		_helipad1 attachTo [_this, [0,0,0]];
		sleep 0.3;
		_helipad2 = "Land_HelipadEmpty_F" createVehicleLocal (getPosATL _helipad1);
		_helipad2 setPosASL getPosASL _helipad1;
		sleep 1;
		detach _helipad1;
		deleteVehicle _helipad1;
		deleteVehicle _helipad2;

};
};

Well, not to rain on anyone's parade, but "reviewed" is a pure moderator status originally, so it means that we, moderators, deem it a sufficiently described ticket.

"Acknowledged" should mark, that it has been reviewed by a developer and "assigned", potentially that someone is actively working on it (or it's being at least actively tracked by QA).

oukej added a comment.Sep 26 2014, 6:51 PM

It should be now fully fixed in Dev Branch.
Please, let us know, if you bump into any issue reg. this.
Thanks a lot!

Great news :)
Thanks

Mass-closing all resolved issues not updated in the last month.

Please PM me in BI Forums (http://forums.bistudio.com/member.php?55374-Fireball) if you feel your bug was closed in error.