Jump to content

CSG Prefabs loaded by script have no collision.


Recommended Posts

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

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

  • 4 years later...
  • Admin locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...