文档

Unity Engine

Download Unity

Unity Engine

TryGetAcceleration(out Vector3)

Attempt to retrieve a vector representing the current acceleration of the tracked node.
阅读时间1 分钟最后更新于 12 天前

Definition

  • Type: Method
  • Namespace: UnityEngine.XR
  • Assembly: UnityEngine.XRModule

TryGetAcceleration(Vector3)

public bool TryGetAcceleration(out Vector3 acceleration)

Parameters

acceleration

A Vector3 that the method sets to the current acceleration of the tracked node, or to Vector3.zero if the acceleration isn't available.

Returns

Type

Description

boolTrue if the acceleration was set in the output parameter. False if the acceleration is not available due to limitations of the underlying platform or if the node is not presently tracked.