S&box Wiki

Revision Difference

PhysicsHullFromRender#543885

<cat>Dev.Model</cat>⤶ <title>Adding physics to your model</title>⤶ ⤶ # PhysicsHullFromRender⤶ ⤶ Physics hull from render basically generates a hull mesh for your model from the geometry of the rendered mesh. It usually isn't the best but it is fairly okay for quickly testing things. To add this to your model, simply look for PhysicsHullFromRender on the type browser and simply add it. ⤶ ⤶ ![PhysicsHullFromRender](https://i.imgur.com/ARJRV1t.png)⤶ ⤶ If your model contains bones, it will ask you to pick the bone to generate the hull mesh for. For jointed objects note that you should refrain from using automatically generated phys models and go for physics shaped objects like capsules, spheres and boxes. If it is a biped ragdoll note that you can go for either creating a biped ragdoll or creating just ragdoll parts individually.⤶ ⤶ # PhysicsMeshFile / PhysicsHullFile⤶ ⤶ Another way to add physics to your model is using a prebuilt physics model which you made yourself outside of ModelDoc. This is usually the preferred way to go for porting old assets since you can re-use your old physmodel. To add something like that simply look for either of the following options: ⤶ ⤶ ![PhysicsHullFile](https://i.imgur.com/GQrUh1Y.png) ![PhysicsMeshFile](https://i.imgur.com/ZtAcaUL.png)⤶ ⤶ Either of these two options are going to prompt you to load the .smd which you'd like to use as a physics model for your model, once it's added simply compile it and toy around with your model which now has some nice physics!