The goal is this:
I am trying to make a whole lot of guns, and write a generalized script for them all that will let me load in the models, create some empty objects for where the muzzle flash should be, etc, set values, and be done. The guns have two different modes, equipped (ie: they’re onscreen, carried by the player, shooting things whathaveyou) and dropped (they’re in the world, sliding down ramps, being knocked about by explosions).
I need a way to assign a rigid body and collider to these guns that I can turn on and off in the script, without hardcoding any values (or wrapping every possible rigidbody and collider value in my script and exposing it to the inspector).
I have tried .enabled - no luck. I have tried turning isKinematic on and .isTrigger - the problem is, when you turn .isTrigger back to false (ie: the player drops the gun) it doesn’t take, and the gun falls right through the floor.
Any other ideas?