31 July 2019

18 August 2015

Corrade can alter existing in-world primitives' flags by using the setprimitiveflags command.

CommandRequired ParametersRequired Corrade PermissionsExample
setprimitiveflagsgroup, password, iteminteract
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // turn on physics for a primitive
            // named "Ball" in a 2m range
            "command", "setprimitiveflags",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "item", "Ball",
            "range", 2,
            "physics", "True"
        ]
    )
);
Optional ParameterPossible ValueDescription
rangeA range in meters.The spherical distance from Corrade in which to locate the item.
temporaryTrue or FalseWhether the object is temporary.
shadowsTrue or FalseWhether the object casts shadows - this is deprecated and does nothing.
restitutionSingleThe primitive's restitution.
phantomTrue or FalseWhether the primitive is a phantom.
frictionSingleThe fiction of the primitive.
densitySingleThe density of the primitive.
physicsTrue or FalseWhether the object has physics enabled.
typeOne of PhysicsShapeType.The physics shape.
densityA float value (default $1000$ - measured in $100\frac{kg}{m^3}$).The object density.
frictionA float value (default $0.6$).The object friction.
restitutionA float value (default $0.5$).The object restitution (bounciness).
gravityA float value (default $1$ - representing a gravity multiplier).The object gravity multiplier.
selectionattached, rezzed or all (default: all)Either attached, rezzed or all for selecting only primitives or objects attached to avatars, primitives or objects rezzed in-world or all primitives or objects respectively.

Since the parameters are all optional, when some parameters are not supplied, the already existing values take effect.

Notes