Skip to main content
Applies an emissive glow to the meshes of a selected body. This is a convenience hook built on top of useBodyMeshes — if you need more control over how meshes are styled, use useBodyMeshes directly.

Signature

Usage

Composing with Other Logic

The hook is useful when you want to combine highlighting with other behavior in a single component:

Parameters

How It Works

  1. Uses useBodyMeshes to get the meshes for the given body ID
  2. Sets the mesh material’s emissive color and emissiveIntensity
  3. Restores original emissive values when bodyId changes or the component unmounts
  • useBodyMeshes — the low-level primitive this hook is built on, for custom visuals and postprocessing