PlayerWrapper
- class Player.PlayerWrapper(object: Object)
Bases:
Object- class MovementType
Bases:
object- Locomotion: Any = Ellipsis
Motion
- Teleport: Any = Ellipsis
Teleport
- All: Any = Ellipsis
Any movement
- class RotationTypes
Bases:
object- ToObject: Any = Ellipsis
To object
- SameAsObject: Any = Ellipsis
The same way as
- class Gravity
Bases:
object- GravityOn: Any = Ellipsis
Affected by gravity
- GravityOff: Any = Ellipsis
Does not affected by gravity
- class SwitchStateTypes
Bases:
object- Enabled: Any = Ellipsis
Enabled
- Disabled: Any = Ellipsis
Disabled
- class AllowedStates
Bases:
object- Allowed: Any = Ellipsis
Allowed
- Prohibited: Any = Ellipsis
Prohibited
- class PlayerHand
Bases:
object- RightHand: Any = Ellipsis
Right hand
- LeftHand: Any = Ellipsis
Left hand
- BothHands: Any = Ellipsis
Both hands
- property WalkingSpeed: float
Walking speed in Desktop view mode [value] m/s
Example:
value = instance.WalkingSpeed
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property SprintSpeed: float
Running speed [value] m/s
Example:
value = instance.SprintSpeed
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property JumpHeight: float
Jump height [value] m
Example:
value = instance.JumpHeight
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property PlayerNormalHeight: float
Player height in Desktop view mode [value] m
Example:
value = instance.PlayerNormalHeight
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property UseGravity: Any
Physical property
- Returns:
value from the list:
PlayerWrapper.Gravity.GravityOn
PlayerWrapper.Gravity.GravityOff
Example:
value = instance.UseGravity
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property IsArcIsHiddenOnDisabledTeleport: bool
Hide arc on disabled teleport
Example:
value = instance.IsArcIsHiddenOnDisabledTeleport
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property CursorIsVisible: Any
Cursor visibility in Desktop-play mode
- Returns:
value from the list:
PlayerWrapper.SwitchStateTypes.Enabled
PlayerWrapper.SwitchStateTypes.Disabled
Example:
value = instance.CursorIsVisible
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property IsMouseLookEnabled: Any
Rotate camera with mouse in Desktop-play mode
- Returns:
value from the list:
PlayerWrapper.AllowedStates.Allowed
PlayerWrapper.AllowedStates.Prohibited
Example:
value = instance.IsMouseLookEnabled
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property IsTurnInVREnabled: Any
Rotate in VR using a controller
- Returns:
value from the list:
PlayerWrapper.AllowedStates.Allowed
PlayerWrapper.AllowedStates.Prohibited
Example:
value = instance.IsTurnInVREnabled
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property ObjectInteraction: Any
Interaction with object is
- Returns:
value from the list:
PlayerWrapper.AllowedStates.Allowed
PlayerWrapper.AllowedStates.Prohibited
Example:
value = instance.ObjectInteraction
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property PointerLength: float
Pointer beam length to
Example:
value = instance.PointerLength
- property AlwaysDrawRay: bool
Constantly display pointer beam
Example:
value = instance.AlwaysDrawRay
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property BeginWidth: float
Initial pointer beam width to [value] m
Example:
value = instance.BeginWidth
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property EndWidth: float
Final pointer beam width to [value] m
Example:
value = instance.EndWidth
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property BeginColor: Color
Initial pointer beam color to [value]
Example:
value = instance.BeginColor
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property EndColor: Color
Final pointer beam color to [value]
Example:
value = instance.EndColor
Warning
An AttributeError exception may occur during use if the getter has not been implemented.
- property HandsRadius: float
Hand collider radius
Example:
value = instance.HandsRadius
- CheckHoldAnyObject() bool
Is holding any object
Example:
value = instance.CheckHoldAnyObject()
- CheckObjectInAnyHand(otherObject: Object) bool
Is holding in any hand
- Parameters:
(Object) (otherObject) – scene object
Example:
value = instance.CheckObjectInAnyHand(sceneObject)
- CheckObjectInLeftHand(otherObject: Object) bool
Is holding in left hand
- Parameters:
(Object) (otherObject) – scene object
Example:
value = instance.CheckObjectInLeftHand(sceneObject)
- CheckObjectInRightHand(otherObject: Object) bool
Is holding in right hand
- Parameters:
(Object) (otherObject) – scene object
Example:
value = instance.CheckObjectInRightHand(sceneObject)
- AllowMovementEverywhere() None
Can move anywhere
Example:
instance.AllowMovementEverywhere()
- AllowMovementOnlyTeleportArea() None
Can move around the movement area
Example:
instance.AllowMovementOnlyTeleportArea()
- AllowMovementType(type: int) None
Allow
- Parameters:
(int) (type) –
value from the list:
PlayerWrapper.MovementType.Locomotion
PlayerWrapper.MovementType.Teleport
PlayerWrapper.MovementType.All
Example:
instance.AllowMovementType(PlayerWrapper.MovementType.Locomotion)
- ProhibitMovementType(type: int) None
Prohibit
- Parameters:
(int) (type) –
value from the list:
PlayerWrapper.MovementType.Locomotion
PlayerWrapper.MovementType.Teleport
PlayerWrapper.MovementType.All
Example:
instance.ProhibitMovementType(PlayerWrapper.MovementType.Locomotion)
- TeleportToStartPosition() None
Return to the starting position
Example:
instance.TeleportToStartPosition()
- TeleportToObject(targetObj: Object) None
Teleport to object
- Parameters:
(Object) (targetObj) – scene object
Example:
instance.TeleportToObject(sceneObject)
- TeleportToVector(targetVector: Vector3) None
Teleport to coordinates
Example:
instance.TeleportToVector(Varwin.Vector3(1,1,1))
- async MoveToPointWithSpeed(target: Vector3, speed: float) None
Move to coordinates [target] at a speed of [speed] m/s
Example:
await instance.MoveToPointWithSpeed(Varwin.Vector3(1,1,1), 0)
- async MoveToObjectWithSpeed(targetWrapper: Object, speed: float) None
Move to object [targetWrapper] at a speed of [speed] m/s
- Parameters:
(Object) (targetWrapper) – scene object
Example:
await instance.MoveToObjectWithSpeed(sceneObject, 0)
- RotateHorizontally(angle: float) None
Instantly rotate horizontally by [angle] degrees
Example:
instance.RotateHorizontally(0)
- RotateTo(rotationTapes: int, target: Object) None
Instantly rotate
- Parameters:
(int) (rotationTapes) –
value from the list:
PlayerWrapper.RotationTypes.ToObject
PlayerWrapper.RotationTypes.SameAsObject
(Object) (target) – scene object
Example:
instance.RotateTo(PlayerWrapper.RotationTypes.ToObject, sceneObject)
- SetEulerAngles(targetAngle: Vector3) None
Set rotation
Example:
instance.SetEulerAngles(Varwin.Vector3(1,1,1))
- ForceGrabObjectInLeftHand(otherObject: Object) None
Forcibly grab in the left hand
- Parameters:
(Object) (otherObject) – scene object
Example:
instance.ForceGrabObjectInLeftHand(sceneObject)
- ForceGrabObjectInRightHand(otherObject: Object) None
Forcibly grab in the right hand
- Parameters:
(Object) (otherObject) – scene object
Example:
instance.ForceGrabObjectInRightHand(sceneObject)
- async ForceDropFromBothHands() None
Forcibly ungrab objects from both hands
Example:
await instance.ForceDropFromBothHands()
- async ForceDropObjectInLeftHand() None
Forcibly ungrab object from the left hand
Example:
await instance.ForceDropObjectInLeftHand()
- async ForceDropObjectInRightHand() None
Forcibly ungrab object from the right hand
Example:
await instance.ForceDropObjectInRightHand()
- VibrateLeftHand(strength: float, duration: float) None
Vibrate with parameters for the left hand and strength [0..1] to [strength] duration [duration] s.
Example:
instance.VibrateLeftHand(0, 0)
- VibrateRightHand(strength: float, duration: float) None
Vibrate with parameters for the right hand and strength [0..1] to [strength] duration [duration] s.
Example:
instance.VibrateRightHand(0, 0)
- VibrateLeftHandPreset(vibrationPreset: int) None
Vibrate for the left hand with intensity [vibrationPreset]
- Parameters:
(int) (vibrationPreset) –
value from the list:
PlayerWrapper.VibrationPreset.Weak
PlayerWrapper.VibrationPreset.Strong
Example:
instance.VibrateLeftHandPreset(PlayerWrapper.VibrationPreset.Weak)
- VibrateRightHandPreset(vibrationPreset: int) None
Vibrate for the right hand with intensity [vibrationPreset]
- Parameters:
(int) (vibrationPreset) –
value from the list:
PlayerWrapper.VibrationPreset.Weak
PlayerWrapper.VibrationPreset.Strong
Example:
instance.VibrateRightHandPreset(PlayerWrapper.VibrationPreset.Weak)
- async VibrateWithIntervals(hand: int, strength: float, duration: float, interval: float, vibrationCount: int) None
Vibrate for [hand] and strength [0..1] to [strength] duration [duration] s. interval [interval] s. vibration amount [vibrationCount]
- Parameters:
(int) (hand) –
value from the list:
PlayerWrapper.PlayerHand.RightHand
PlayerWrapper.PlayerHand.LeftHand
PlayerWrapper.PlayerHand.BothHands
Example:
await instance.VibrateWithIntervals(PlayerWrapper.PlayerHand.RightHand, 0, 0, 0, 0)
- AttachCameraToObject(target: Object, positionOffset: Vector3, rotationOffset: Vector3) None
Attach camera to object [target] with position offset [positionOffset] rotation offset [rotationOffset]
- Parameters:
(Object) (target) – scene object
Example:
instance.AttachCameraToObject(sceneObject, Varwin.Vector3(1,1,1), Varwin.Vector3(1,1,1))
- DetachCameraFromObject() None
Detach the camera from object
Example:
instance.DetachCameraFromObject()
- AddAnyHandCollidedHandler(handler: Callable[[Any, Object, Object], CoroutineType]) None
Hand collided [hand] with object [wrapperObject]
- Parameters:
handler –
Asynchronous handler function with signature:
hand (Any): hand
wrapperObject (Object): scene object
sender (Object): the object that triggered the event
Example:
async def OnAnyHandCollided(hand, wrapperObject, sender): pass instance.AddAnyHandCollidedHandler(OnAnyHandCollided)
- AddControllerEnabledHandler(handler: Callable[[Any, Object], CoroutineType]) None
Controller enabled
- Parameters:
handler –
Asynchronous handler function with signature:
hand (Any): hand
sender (Object): the object that triggered the event
Example:
async def OnControllerEnabled(hand, sender): pass instance.AddControllerEnabledHandler(OnControllerEnabled)
- AddControllerDisabledHandler(handler: Callable[[Any, Object], CoroutineType]) None
Controller disabled
- Parameters:
handler –
Asynchronous handler function with signature:
hand (Any): hand
sender (Object): the object that triggered the event
Example:
async def OnControllerDisabled(hand, sender): pass instance.AddControllerDisabledHandler(OnControllerDisabled)