Many parts by default return deployed (extended) state
ihsoft opened this issue ยท 2 comments
Some parts' meshes by default are set into expanded state (e.g. Drill-O-Matic). It affects (de)attach pointer and volume checks.
You can take advantage of the IMultipleDragCube
interface to solve this.
This is implemented on most of the stock modules that have an extended/retracted state.
IMultipleDragCube.AssumeDragCubePosition(string name)
will put the part (ideally the prefab) in a specific state, animation/model wise.
It also is implemented on ModulePartVariants
, to set the part into each variant configuration (by providing the variant name).
IMultipleDragCube.GetDragCubeNames()
can be used to get the strings to be passed as a parameter, for most modules, this is a static array.