Skip to content

Get Sansar

Script API

ObjectPublic

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.InstanceInterface

Remarks

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

KindMembers
PropertiesForwardVector · InitialPosition · InitialRotation · Name · ObjectId · Position · RightVector · Rotation · UpVector
MethodsToString

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

Added in 31.1.0
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.