Breakroom is now Sinewave Campus. Book a meeting

SAvatar

ServerScene
On this classID
  1. Properties
  2. ID
  3. Position
  4. Velocity
  5. Rotation
  6. Username
  7. Title
Members 6
PropertyIDAvatar's ID
PropertyPositionAvatar's position
PropertyVelocityAvatar's Velocity
PropertyRotationAvatar's Rotation
PropertyUsernameAvatar's Username
PropertyTitleAvatar's Title

Properties​

IDRead only​

int ID {get; }

Avatar's ID

Example

Lua
ID = Space.Scene.Avatars[1].ID
Lua
--server script that prints a list of IDs of players online whenever someone joins
function OnAvatarJoin(id)
local numOfAvatars = Space.Scene.ConnectedAvatars

for num =1 , numOfAvatars, 1 do
Space.Log(Space.Scene.Avatars[num].ID)
end
end

PositionRead only​

Vector3 Position {get; }

Avatar's position

Example

Lua
ID = Space.Scene.Avatars[1].Position
Lua
--server script that prints a list of Positions of players online whenever someone joins
function OnAvatarJoin(id)
local numOfAvatars = Space.Scene.ConnectedAvatars

for num =1 , numOfAvatars, 1 do
Space.Log(Space.Scene.Avatars[num].Position)
end
end

VelocityRead only​

Vector3 Velocity {get; }

Avatar's Velocity

Example

Lua
ID = Space.Scene.Avatars[1].Velocity
Lua
--server script that prints a list of Velocitys of players online whenever someone joins
function OnAvatarJoin(id)
local numOfAvatars = Space.Scene.ConnectedAvatars

for num =1 , numOfAvatars, 1 do
Space.Log(Space.Scene.Avatars[num].Velocity)
end
end

RotationRead only​

Quaternion Rotation {get; }

Avatar's Rotation

Example

Lua
ID = Space.Scene.Avatars[1].Quaternion
Lua
--server script that prints a list of Rotations of players online whenever someone joins
function OnAvatarJoin(id)
local numOfAvatars = Space.Scene.ConnectedAvatars

for num =1 , numOfAvatars, 1 do
Space.Log(Space.Scene.Avatars[num].Rotation)
end
end

UsernameRead only​

string Username {get; }

Avatar's Username

Example

Lua
ID = Space.Scene.Avatars[1].Username
Lua
--server script that prints a list of Usernames of players online whenever someone joins
function OnAvatarJoin(id)
local numOfAvatars = Space.Scene.ConnectedAvatars

for num =1 , numOfAvatars, 1 do
Space.Log(Space.Scene.Avatars[num].Username)
end
end

TitleRead only​

string Title {get; }

Avatar's Title

Example

Lua
ID = Space.Scene.Avatars[1].Title
Lua
--server script that prints a list of Titles of players online whenever someone joins
function OnAvatarJoin(id)
local numOfAvatars = Space.Scene.ConnectedAvatars

for num =1 , numOfAvatars, 1 do
Space.Log(Space.Scene.Avatars[num].Title)
end
end