Jump to content

List of layer masks to use with Physics.Raycast()?


Recommended Posts

I've been trying to find documentation on the layer masks that KSP uses and haven't been able to find much. Does anyone know where a list of the different masks?

For example, KethaneExtractor uses bit 15. KAS uses 1, 2, 15, and 19 when looking for parts (557059, 0x88003). Something else switches off layers 2, 11, and 13 (which is 0x1402) and calls them the "DestructionCollider, ScreenSafeUI and ScaledSpace layers".

Derp. An actual list of these layers would be nice :)

Link to comment
Share on other sites

  • 2 months later...

For future reference, that returns:


[LOG 21:04:29.355] 0: Default
[LOG 21:04:29.355] 1: TransparentFX
[LOG 21:04:29.356] 2: Ignore Raycast
[LOG 21:04:29.356] 3:
[LOG 21:04:29.356] 4: Water
[LOG 21:04:29.356] 5:
[LOG 21:04:29.357] 6:
[LOG 21:04:29.357] 7:
[LOG 21:04:29.357] 8: PartsList_Icons
[LOG 21:04:29.358] 9: Atmosphere
[LOG 21:04:29.358] 10: Scaled Scenery
[LOG 21:04:29.358] 11: UI_Culled
[LOG 21:04:29.359] 12: UI_Main
[LOG 21:04:29.359] 13: UI_Mask
[LOG 21:04:29.359] 14: Screens
[LOG 21:04:29.360] 15: Local Scenery
[LOG 21:04:29.360] 16: kerbals
[LOG 21:04:29.360] 17: Editor_UI
[LOG 21:04:29.361] 18: SkySphere
[LOG 21:04:29.361] 19: Disconnected Parts
[LOG 21:04:29.361] 20: Internal Space
[LOG 21:04:29.362] 21: Part Triggers
[LOG 21:04:29.362] 22: KerbalInstructors
[LOG 21:04:29.362] 23: ScaledSpaceSun
[LOG 21:04:29.363] 24: MapFX
[LOG 21:04:29.363] 25: EzGUI_UI
[LOG 21:04:29.363] 26: WheelCollidersIgnore
[LOG 21:04:29.364] 27: WheelColliders
[LOG 21:04:29.364] 28: TerrainColliders
[LOG 21:04:29.364] 29:
[LOG 21:04:29.365] 30:
[LOG 21:04:29.365] 31: Vectors

Link to comment
Share on other sites

To add to that list, Parts that are part of the current vessel are on layer 0.

I had assumed that all parts being rendered were on layer 0, but the layer 19 being labeled "Disconnected Parts" makes me wonder. All my tests involved the current active vessel, I never had a reason to check the layer of parts not attached.

D.

Link to comment
Share on other sites

  • 7 years later...

Updated list for KSP 1.12

0 : Default
1 : TransparentFX
2 : Ignore Raycast
3 : 
4 : Water
5 : UI
6 : 
7 : 
8 : PartsList_Icons
9 : Atmosphere
10 : Scaled Scenery
11 : UIDialog
12 : UIVectors
13 : UI_Mask
14 : Screens
15 : Local Scenery
16 : kerbals
17 : EVA
18 : SkySphere
19 : PhysicalObjects
20 : Internal Space
21 : Part Triggers
22 : KerbalInstructors
23 : AeroFXIgnore
24 : MapFX
25 : UIAdditional
26 : WheelCollidersIgnore
27 : WheelColliders
28 : TerrainColliders
29 : DragRender
30 : SurfaceFX
31 : Vectors

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...