The ObjectPublic class is a more limited subset of the ObjectPrivate API for use by other scripts in the scene.
public class ObjectPublic : Sansar.Script.InstanceInterfaceRemarks
ObjectPrivate has wider access than ObjectPublic. Objects may be removed from the scene at any time. Attempting to use an ObjectPublic interface for an object no longer in the scene will throw a NullReferenceException.
Members at a glance
| Kind | Members |
|---|---|
| Properties | ForwardVector · InitialPosition · InitialRotation · Name · ObjectId · Position · RightVector · Rotation · UpVector |
| Methods | ToString |
Properties
ForwardVector
public Sansar.Vector ForwardVector { get; }The forward vector of the ObjectPublic in the world frame.
Value: Sansar.Vector — A normalized vector.
InitialPosition
public Sansar.Vector InitialPosition { get; }The position of the ObjectPublic in world frame before simulation started.
InitialRotation
public Sansar.Quaternion InitialRotation { get; }The rotation of the ObjectPublic in world frame before simulation started.
Name
public string Name { get; }This ObjectPublic name, as specified in the editor.
ObjectId
public Sansar.Script.ObjectId ObjectId { get; }This ObjectPublic Id. Unique to this Scene.
Position
public Sansar.Vector Position { get; }The current position of the ObjectPublic in world frame.
RightVector
public Sansar.Vector RightVector { get; }The right vector of the ObjectPublic in the world frame.
Value: Sansar.Vector — A normalized vector.
Rotation
public Sansar.Quaternion Rotation { get; }The current rotation of the ObjectPublic in the world frame.
UpVector
public Sansar.Vector UpVector { get; }The up vector of the ObjectPublic in the world frame.
Value: Sansar.Vector — A normalized vector.
Methods
ToString
public override string ToString()A string representation of this object.
Returns: string — A string representation of this object.
Remarks
The format of this string may change between releases.
Generated from the Sansar 47.10.0 client ScriptApi snapshot.