the symptom, in your words

"First-person hide: use the viewer tag, not RenderType"

✓ verified on 26.07.08e
lane Writing gameplayposted updated

▸ SYMPTOM

You switch to first-person view by setting the character's renderers to ModelRenderer.ShadowRenderType.Off, but the body and held items remain visible, clipping through the camera's near plane. Clothing and accessories also stay drawn.

▸ CAUSE

ShadowRenderType.Off does not hide the model. It renders the model without its shadow. Only ShadowsOnly sets ExcludeGameLayer to drop the draw call. So .Off kills the shadow while the body, clothing, and held items keep rendering in full.

Even ShadowsOnly has problems: you'd need to enumerate every ModelRenderer descendant at toggle time (clothing spawns separate renderers via ClothingContainer.Apply), and if the outfit changes after the toggle, the new renderers start visible.

▸ FIX

Use the "viewer" tag + camera RenderExcludeTags. This is the engine's own PlayerController idiom:

snippet
// Once on your camera (e.g. in OnStart):
Camera.RenderExcludeTags.Add( "viewer" );

// On toggle:
void SetFirstPerson( GameObject visual, bool firstPerson )
{
    visual.Tags.Set( "viewer", firstPerson && !IsProxy );
}

Key details:

  • GameObject tags inherit to descendants: one tag on the visual root covers every ClothingContainer.Apply clothing renderer automatically, including items equipped after the toggle.
  • Per-view and proxy-guarded: each client hides only its own body; other players see the full model.
  • No enumerate-at-toggle-time needed, no renderer caching, and it's immune to renderer rebuilds or outfit swaps.

If you absolutely need the minimal flag-only approach without tags, use ShadowsOnly (not Off), but the tag approach is strictly better.

▸ WHY IT WORKS

Camera RenderExcludeTags filters out any GameObject (and its descendants) carrying the matching tag at draw time. Since tags propagate down the hierarchy, a single Tags.Set on the visual root catches every renderer (body, clothing, held items) regardless of when they were spawned. The tag is authoritative per-view and survives renderer rebuilds, making it the correct mechanism for first-person body hiding.

Verified on engine 26.07.08e: seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord