I want to spawn a model that has no physics object, but want to simulate some physics, so the spawned one can be moved around by the player. I don’t care if it looks good, the purpose is only to kick the prop around.
This is the code I used, and I’m pretty sure it worked a while ago, but now the spawned prop is not moving and stuck at the spawned position like it has no physics:
local ent = ents.Create ("prop_physics_override") ent:SetModel ( "models/combine_camera/combine_camera.mdl" ) ent:SetPos( Vector(0,0,0) ) --I use some random vectors here ent:SetAngles( Angle(0,0,0) ) --I use some random angles here ent:Spawn() ent:SetCollisionGroup( COLLISION_GROUP_DEBRIS )
I get this error in console on the call to the ent:Spawn():
ERROR!: Can’t create physics object for models/combine_camera/combine_camera.mdl
I’m aware that this model has no physics object (you can see it if you call ent:GetPhysicsObject() afterwards) but the purpose of prop_physics_override is to use your own physics on the model, isn’t it? So why this errormessage?
I use ents.Create with prop_physics_override because I use random models, some with and some without physics objects.
Is this a bug or I’m doing something wrong?