Gmod-vphysics icon indicating copy to clipboard operation
Gmod-vphysics copied to clipboard

Custom PhysicsInit & CollisionBounds Ents Fall Through World

Open kklouzal opened this issue 11 years ago • 3 comments

Setting a custom PhysicsInit and CollisionBounds on and entity will cause the entity, once touched with the physgun, to fall through the world, as it touches the world it voilently "spazzes out" as it slowly falls through the world geometry

LUA to replicate: function ENT:Initialize() self:PhysicsInit( SOLID_VPHYSICS ) self:SetMoveType( MOVETYPE_VPHYSICS ) self:SetSolid( SOLID_VPHYSICS ) local min = self:OBBMins() local max = self:OBBMaxs() self:PhysicsInitBox(min,max) self:SetCollisionBounds(min,max) end

kklouzal avatar Feb 15 '14 12:02 kklouzal

I can confirm that it falls through the world, because the game's collision solver ShouldCollide returns false. It also falls slowly due to the drag controller, and the object having a drag coefficient of 1.

Does this happen on valve's vphysics?

DrChat avatar Feb 15 '14 17:02 DrChat

No, this does not happen on valves physics, all though valves physics in this respect are not completely correct, I do not know if it is related to my code but if you rotate the prop after setting the collision bounds like I have described in the previous post, the custom physics box does not rotate with the prop, it follows the props positioning but not its rotational changes.

kklouzal avatar Feb 15 '14 19:02 kklouzal

If it's a red box, that's the object's AABB. It doesn't rotate at all. Probably related to object contents or something stupid like that.

DrChat avatar Feb 15 '14 20:02 DrChat