Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom PhysicsInit & CollisionBounds Ents Fall Through World #22

Open
kklouzal opened this issue Feb 15, 2014 · 3 comments
Open

Custom PhysicsInit & CollisionBounds Ents Fall Through World #22

kklouzal opened this issue Feb 15, 2014 · 3 comments

Comments

@kklouzal
Copy link

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

@DrChat
Copy link
Owner

DrChat commented Feb 15, 2014

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?

@kklouzal
Copy link
Author

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.

@DrChat
Copy link
Owner

DrChat commented Feb 15, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants