disableCollisionWith seems to have no effect as of Alpha 0.54.103957; vehicles the command gets used on still collide with each other.
Description
Details
- Legacy ID
- 2693949773
- Severity
- None
- Resolution
- Open
- Reproducibility
- Always
- Category
- Feature Request
- Place down two vehicles (car1 and car2)
- Apply car1 disableCollisionWith car2
- Run the vehicles into each other
Event Timeline
The command does work but not in the way you'd expect.
it only seems to disable soldiers and vehicles and not vehicle to vehicle / object to object collisions.
Vehicle to Vehicle would be useful when using attachto command to stop damage.
Vehicle to Vehicle would be useful when using attachto command to stop damage.
Which is exactly what I was hoping to do with this command. Tired of vehicles blowing up because the attached object collides with it. ;)
Guess it's not really a bug report but more of a feature request, then.
Confirmed.
I distinctly remember trying this with two hunters in the early alphas and the engine respected the "disableCollisionWith" between two of them.
The documentation and neokika's comment on the forum also leads me to believe that this is a bug.
This commmand doesn't disable collision between PhysX objects. I changed to feature request.
Added astaroth comment to wiki http://community.bistudio.com/wiki/disableCollisionWith
This command has a strange behaviour, repeatable, if used in nested loop:
{_veh = _x; { _veh disableCollisionWith _x;true} count (allunits select {isnull objectParent _x}); true} count vehicles;
will fire only for one vehicle on all foot units, and just for one unit (generallylast called) for all other vehicles.
Repeatable:
Just place 3 or four foot units; 3 or 4 manned vehicles (like Hunter) playable as you want to crush foot guys. Make all of them without ammo / careless to avoid returned fire (or addrating 100000 for player).
Now, if you're in the last car of the loop, you have disabled the collision with foot units, but if you jump into any other car, you'll crush all foot units but one!
Tested in unscheduled/scheduled environment, with count or forEach syntax. No change.
Ok, some complementary info after test:
Put 4 playable units (no matter of vehicle here), run in SP so you can switch between them or in MP as well with other players.
I placed u1, u2, u3, u4.
now in any script or console, run
{u1 disableCollisionWith _x} forEach [u3,u4]; // just 2 units but test works for 3
play u1. That works!
now run:
{u2 disableCollisionWith _x} forEach [u3,u4];
play u2. That works!
play u1 you lost the behavior on u3. Only u1 on u4 still works
With 6 or 8 units or more, you'll find the same behavior as described above:
the last loop for a unit disabling collision with an array of units is always OK, but overrides the previous loops for some other units, on the same array of targets except one unit of this array ( the first one). (see above).
I guess there is some "matrix" interaction when applying this command.