I am trying to create a large npc that has a proper collision box, I have setup a model with the correct size and the model’s collision box is the correct size. When I pickup the NPC with the phys gun the npc is properly highlighted, but when I attempt to shoot a rocket at the NPC the rocket’s entity doesn’t collide with the NPC. The NPC cannot be shot either.
Did you use SetCollisionBounds?
Yes, then the entity can collide with players and the world. I set the collision group to COLLISION_GROUP_NONE and it still didn’t help. The phys gun can only pickup the entity if I hover over the giant npc’s feet. The bounding box doesn’t want to follow the collision box or vice versa. Any Ideas?
My SNPC base has this:
self:SetCollisionBounds(Vector(-self.m_vcCollisionBounds,-self.m_vcCollisionBounds,-self.m_vcCollisionBounds),Vector(self.m_vcCollisionBounds,self.m_vcCollisionBounds,self.m_vcCollisionBounds)) self:SetHullType(self.m_iHull) self:SetHullSizeNormal() self:SetCollisionGroup(COLLISION_GROUP_NPC) self:SetSolid(SOLID_BBOX)
Physics works flawlessly.
Could I take a look at your SNPC base?
Thanks, I’ll take a look and let you know how it goes. Trying to make a Titan NPC for Attack On Titan.
Props don’t seem to collide with the npc though.
By this point, I’m literally out of ideas as to what could be causing this.
Yep, it’s wierd. The rpg entity collides, the bullets hit… physgun works fine… player collides, but props don’t collide.
Is there a way to get the collision box to be based on the model, that way I can walk under the giant’s legs.