No collision area

I want to create a “no collision area” for a specific area (x, y, z) with radius ( r ).

I was looking through the natives, but the only useful one could be SetEntityNoCollisionEntity, but this only works between entity to entity. I was thinking of calling this for every closest vehicle/ped with the players car/ped whenever the player is the “no collision area” (calculated via Vdist2) and track the vehicles/peds that where set to no collision and put the collision back to true whenever the player leaves the area.

Is this the best solution or by any chance someone has a better idea? Would really appreciate any interesting ideas.

Hi you mean no collision with full world including ground ?

Of course not, just vehicles and peds. For that I could just SetEntityCollision, because it disables collision with everything, but that’s pretty useless.

Your first post seems to be your only option…

I found a better solution IF it’s ok for you to also not see other players.
If anyone is searching for the answer to this.
The natives that you need to use.
NetworkFadeOutEntity, NetworkFadeInEntity and also SetLocalPlayerVisibleLocally that needs to be called each tick when inside the no collision area.

But I’m still not sure about the solution where the vehicle can be visible to others, but just there are no collisions. The solution that I wrote above might be suitable, but not the best, not sure…

1 Like