Physical

From Second Life Wiki
Revision as of 16:49, 21 December 2013 by Strife Onizuka (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
This article is about the object attribute 'physical'. For To learn about the physics, see Physics engine. For LSL content on physics and physical, see Category:LSL Physics.

General

All objects interact with the physics engine to a certain extent. All objects have mass and volume both of which have implications for scripting, even attachments.

Objects which are 'Physical' are those that have opted into having the physics engine update their position and rotation. Objects that are non-physical will not have their positions and rotations updated by the physics engine. This means that 'Physical' objects will experience gravity and can be pushed around while non-physical objects will just float in midair.

There is a limit on object complexity. Objects which have a physics cost greater than 32 cannot have physical enabled.

There are some interesting combining of 'physical' with object attributes:

  • Phantom objects will not collide nor rebound with other objects or avatars but will collide and rebound with the ground.
  • Volume detect (a scripting feature) is like phantom except that it won't collide with the ground. If an avatar or physical object interpenetrates the object the objects scripts will be notified (unless it is another volume detect object).

Tips

  • Don't enable physics on your object unless you are prepared for it to immediately fall to the ground.
  • Physical objects have momentum, when you drag them around, you maybe imparting momentum on the object.
  • When scripting physical objects you may want to consider using STATUS_SANDBOX to keep the object from escaping.
  • Strange things happen when physical objects interpenetrate.
    • Do not make chains, the results will be less than satisfactory.

Scripting

See: Category:LSL Physics