• Entity collision with skybox.
    1 replies, posted
Sup everyone. I'm making artillery sweps, which are based on gbombs. So far everything is ready and works as intended BUT there is one major problem. Since I want to make comparable with more maps, I have to somehow make rockets no colide with skybox, since on maps where skybox is small, rockets explode when they hit it, doing nothing pretty much. There is possible solution to create timer, which would make rockets non-collidable for 2-3 seconds after spawn and then become collidable aswell, but again this might create some bugs, like rockets flying though buildings and roofs. So, i'm asking if there is any other way to do it, since there is no collision group which makes entity not colidable with skybox.
You can use hull tracers to find out if there is a solid path to the skybox. If there are a free path Make it no-colidable until its within the map. If there isn't a free path Make another tracer from the skybox to the target and check where the shell will hit. Then tell th e shell to no-collide until its within the hitrange of the last tracer and then explode. Here are two useful functions I've made to get the map-size: function util.MapOBBMaxs()     return game.GetWorld():GetSaveTable().m_WorldMaxs or Vector(0,0,0) end function util.MapOBBMins()     return game.GetWorld():GetSaveTable().m_WorldMins or Vector(0,0,0) end
Sorry, you need to Log In to post a reply to this thread.