Einlander Posted August 21, 2014 Share Posted August 21, 2014 When using the lua script to load a prefab made from csg's the collision does not load. Link to comment Share on other sites More sharing options...
macklebee Posted August 21, 2014 Share Posted August 21, 2014 Add an empty script to that CSG brush and then save it as a prefab. If you load that prefab with App.lua then it will be loaded with its physics body, assuming you set the shape in the Physics tab. Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Einlander Posted August 21, 2014 Author Share Posted August 21, 2014 I'm starting to think that this bug is starting to fall under an unintended results category. You do not need to attache a script to the csg in the prefab to get physics to work. you must select EVERY SINGLE CSG in the prefab and set the shape. If you use the csg prefab in the editor, then it works as it should. If you do it manually in code then you must set everything manually beforehand. This has the potential to became tedious. For example, I already have a fully articulated house created with csg's. The entity count is already over 100. Now i have to go back and add a physics property to every csg because there is a possibility that i might have the house spawn dynamically through code. Hopefully this is a bug, if need be I can make a suggestion for all prefabs to have their default editor physics shape/states loaded when called from code. Link to comment Share on other sites More sharing options...
Josh Posted August 21, 2014 Share Posted August 21, 2014 The default behavior when brushes are loaded is for them to be collapsed into static mesh geometry, which does have collision but does not move. I have not tested this yet and do not know exactly what you mean when you say "the collision does not load". My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Einlander Posted August 22, 2014 Author Share Posted August 22, 2014 I'll post a video of what i'm talking about in a little bit. Link for when the video is finished uploading and processed: Link to comment Share on other sites More sharing options...
Admin Posted March 12, 2019 Share Posted March 12, 2019 I attempted to recreate your situation here and it worked correctly. I think this is fixed. test.zip Link to comment Share on other sites More sharing options...
Recommended Posts