Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: starbug on August 21, 2017, 01:09:20 am

Title: How to fix flying through a ship
Post by: starbug on August 21, 2017, 01:09:20 am
I have a bit of problem with a ship model, the problem is that I can fly through the hull of the parts of the ship.

Now the parts of the model in question I have used on other models and I have no issue with them, they are all solid.

 How do I fix this problem as I never encountered it before.
Title: Re: How to fix flying through a ship
Post by: zookeeper on August 21, 2017, 01:48:39 am
Now the parts of the model in question I have used on other models and I have no issue with them, they are all solid.

Does that mean that those parts are submodels you've imported from other models? If so then I'd first check your model (not submodel) radius and bounding boxes. Those are used for culling collisions, so if a part of your ship is actually outside its nominal bounding box and/or radius, that part will (probably, usually) not collide with anything.
Title: Re: How to fix flying through a ship
Post by: starbug on August 21, 2017, 02:26:40 am
Yeah it's the way I modelled my republic fleet, as in universe they are modular in fleet design. So I have a master file with are the ship parts modelled as separate pieces so I can interchange.

So is the bounding boxes fixable in PCS?
Title: Re: How to fix flying through a ship
Post by: Darius on August 21, 2017, 02:44:54 am
Purge BSP cache from drop down menus, see if that works.
Title: Re: How to fix flying through a ship
Post by: zookeeper on August 21, 2017, 03:22:53 am
The model bounding box and radius (in the Header tab) are by default calculated, I think, based on all submodels (possibly including shield mesh), but it doesn't get recalculated when you import extra submodels, so in those cases you probably need to just tweak the values by hand or do a save/load (and possibly use the reset buttons next to the bbox and radius after that?) and hope that doesn't mess anything up.

Also note that the targeting brackets are drawn around Detail-0, so I think you usually want it to have the same bbox values.

I often have submodels extending outside the Detail-0 bbox, in which case my usual workflow is to either tweak the values by hand for Detail-0 and just check by eye that it's about right and then copy the values over to the Header tab, or to actually do the simple arithmetic based on the submodels' offset and bbox values to get the exact model-wide bbox values.
Title: Re: How to fix flying through a ship
Post by: starbug on August 21, 2017, 05:09:02 am
Cool cheers guys :)