Visualize Collision Shape | Sansar Store
Visualize Collision Shape

Visualize Collision Shape


You need to own this item to leave a rating.

0 ratings

This cube creates a visualization of the collision shapes during runtime of your world. It is mainly intended to debug collision shapes attached to bones.
1. Align the box position and size in the editor, such that it covers your object.
2. If you change the size by tuning the scale parameter in the transform properties, then enter the same value also as the scale parameter in the script properties (see screenshot).
3. If your object inside the box is animated, don't start the animation automatically by setting the animation property "Begin On Load" to OFF.
4. Build and enter your world. The white frame of the box will be hidden, instead a grid of red dots will appear. Depending on the number of rays configured on each side this may take a while (approx. 1 min for 30 rays per side).

The script attached to the box is generating a grid on each face of the cube. Then a ray is cast to the opposite point to detect any collision shape on the path. If a collision is detected, a red dot is spawned at that position.
If your scene has changed during runtime, you can retrigger the algorithm by typing "/castrays" in the nearby chat.

Item name
Visualize Collision Shape
Sold by
Full permissions
Min. resale price