Difference between revisions of "Good Building Practices"
Jump to navigation
Jump to search
Hyper Mole (talk | contribs) (Created page with "Physics Optimization: The less the physics engine has to calculate, the smoother your region will perform. Creating clean low poly physics shapes for your meshes is helpful, bu…") |
Hyper Mole (talk | contribs) |
||
Line 25: | Line 25: | ||
Use the following script to set all child prims to None. Be sure to check what physics are needed for your linkset prior to using, and/or add a simple cube as the root prim. | Use the following script to set all child prims to None. Be sure to check what physics are needed for your linkset prior to using, and/or add a simple cube as the root prim. | ||
<lsl> | |||
default | default | ||
{ | { | ||
Line 35: | Line 35: | ||
} | } | ||
} | } | ||
</lsl> |
Revision as of 10:53, 31 March 2012
Physics Optimization:
The less the physics engine has to calculate, the smoother your region will perform. Creating clean low poly physics shapes for your meshes is helpful, but you can also remove prim, mesh, and sculpted objects from the physics calculations completely.
Link your complicated geometry to simple shapes. Here we linked to a cube and set all child prims to physics shape type None:
To simulate a physics shape and keep avatars from walking through your optimized object, just add physics where it's needed.
Use the following script to set all child prims to None. Be sure to check what physics are needed for your linkset prior to using, and/or add a simple cube as the root prim. <lsl> default {
state_entry() { llShout(0, "Setting all child prims to PRIM_PHYSICS_SHAPE_NONE"); llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN, [PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_NONE]); llRemoveInventory(llGetScriptName()); }
} </lsl>