← Paracosm·Docs/Handbook
Contents · Physics and walkability

Physics and walkability

The region's physics engine is BulletSim. A place is judged by what happens when someone stands in it: whether they can get through the door, walk under the tree, climb the stair, and stand on the stone without being shoved.

A place must be walkable

1. Clear doorways for an avatar

At least 1 m wide and 2.2 m tall.

2. Test walkability with a walker, not by eye

Walking a test through the world found faults no render showed: every mesh standing as its own bounding box, a knee-high fern bed that stopped a walker dead, 1959 solid ground-cover prims on one line.

Physics shapes for meshes

3. A mesh's physics defaults to its bounding box

spawn_mesh gives every mesh its bounding BOX as physics unless told otherwise.

4. Give a complex model a SIMPLE custom physics shape

The engine does not hull a static mesh's custom physics block (proven with two thin fins as one physics block: rays fall between them to the ground). So a simple custom shape behaves as drawn:

5. Things you walk through are phantom

Ground cover, leaves, water, mist, smoke. tools/phantomize.py sets phantom live on named families without rebuilding (a rebuild would reset state such as planting ages).

6. Decorative meshes get a tiny physics box

A mesh with no custom physics collides as its whole bounding box. Give decorative parts (a lantern's horn panes, a moss colony) a tiny physics box (buried, for things on the ground) so nothing collides with them, and make them phantom where they should be walked through (after the mesh has settled; see the next section).

Ghost bodies (the phantom race)

7. Setting a mesh phantom as it spawns can leave a solid, invisible body

A mesh set phantom in the same breath as spawning it (a skin script's llSetStatus(STATUS_PHANTOM, TRUE) in state_entry) races the asynchronous mesh-asset fetch: the fetch callback rebuilds a body after the prim left physics. It stays SOLID (a dropped block rests on it), raycasts still name the "phantom" object, and after a delete it lingers nameless ('?', same local id).

Seeing physics

8. Use raycasts, not a walking NPC, to see what is solid

A walking NPC is a noisy judge: it stalls on slopes, and one stopped 4 m short of a tree with the whole tree lifted away. WorldBridge raycast casts through the physics engine and names the object that owns each hit.

9. Prove a crossing with an NPC where an NPC can prove it

npc_create, npc_move to a target, poll avatars for its position.

10. Test climbing with the real avatar and held keys

Move-to-target can fly, so an NPC "climbing" a stair proves nothing. Drive the real avatar with held movement keys (forward plus a turn held, sliding round the wall) and time it: step 3 to the roof walk in 10 s was the proof. Raycast the passage and the ramp heights too.

11. A walkable sheet that comes and goes

Give it its own mesh as the physics shape and toggle llSetStatus(STATUS_PHANTOM, ...) with its state (a frozen pond: an avatar stood on the ice at 20.99 m over a bed at 17.3 m).

Resizing solid prims leaks memory

12. Any script that animates size makes the prim phantom first

Every PRIM_SIZE / llSetScale change on a SOLID prim makes BulletSim build a new collision shape that is never freed (about 75 KB each). Eight chimney-smoke puffs resizing four times a second leaked 2.4 MB/s; the region reached 8.3 GB, the host swapped, and the region froze for 22 s and dropped the visitor. Moving does not leak; only resizing.