SetUserPositionRequest

Updates the User position inside an MMORoom.


MMORooms represent virtual environments and can host any number of Users. Based on their position, the system allows Users within a certain range from each other (Area of Interest, or AoI) to interact.

This request allows the current User to update its position inside the MMORoom, which in turn triggers a SFSEvent.PROXIMITY_LIST_UPDATE event for all Users that fall within its AoI.

Constructor

new SetUserPositionRequest(position, roomopt)

Creates a new instance of the SetUserPositionRequest class.
Pass the instance to the SmartFox#send method to validate and execute the request.
Parameters:
NameTypeAttributesDefaultDescription
positionVec3DThe User position.
roomMMORoom<optional>
nullThe object corresponding to the MMORoom where the User position should be set; if null, the last Room joined by the User is used.