AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Prevent collision between two entities (https://forums.alliedmods.net/showthread.php?t=203828)

fearAR 12-23-2012 17:27

Prevent collision between two entities
 
Hi, I am making a plugin where, a determined number of entities move around the map, so in certain moments, the entities are colliding, and they can't move forward because one is colliding with other, and the other entity suffer the same problem.

So I am looking for a way to prevent this collision, and I am verifying constantly if in front of the entity there is other entity, so it stops moving for a moment, and then it returns to move, but this form isn't sufficient because when one is beside the other, in determined moment they will collide, and they won't move anyway, so I'm looking for a way in which players' entities collides, their bodies moves a little to the side so they can't get inside the other, and stuck each other.

Greetings.

Image examples:

Pre:
[IMG]http://**************/a/img716/1451/asd1ng.jpg[/IMG]

Post:
[IMG]http://**************/a/img202/1941/asd2ew.jpg[/IMG]


All times are GMT -4. The time now is 13:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.