AvatarPawn

AvatarPawn

AvatarPawn is the view-side implementation of Avatar for the local AvatarActor. There is a separate and almost empty RemoteAvatarPawn to show remote avatars.

Methods

# lookTo(pitch, yaw, lookOffset)

Sets the coressponding actor's look configurations by publishing an event to the actor.

Parameters:
Name Type Description
pitch number

the pitch

yaw number

the yaw

lookOffset Vector3

the lookOffset

# setOpacity(opacity)

This method sets the opacity of the 3D model by assigning a different opacity value into the Three.js material.

Parameters:
Name Type Description
opacity number

# gotHome()

This call initiates tells the actor to move back to [0, 0, 0], and resets rotation.

# translateTo(v)

This method updates the local avatar pawn translation directly to the given value to have immediate screen update and publishes an event to set the corresponding actor's translation. (Inherited from CardPawn.)

Parameters:
Name Type Description
v Vector3

the new translation of the avatar.

# rotateTo(q)

This method updates the local avatar pawn translation directly to the given value to have immediate screen update and publishes an event to set the corresponding actors's rotation.

Parameters:
Name Type Description
q Quaternion

the new rotation of the avatar.

# scaleTo(s)

This method updates the local avatar pawn translation directly to the given value to have immediate screen update and publishes an event to set the corresponding actors's scale.

Parameters:
Name Type Description
s Vector3

the new scale of the avatar.