Guides

VRTK_RigidbodyFollow

extends VRTK_ObjectFollow

Overview

Changes one GameObject's rigidbody to follow another GameObject's rigidbody.

Inspector Parameters

  • Movement Option: Specifies how to position and rotate the rigidbody.
  • Track Max Distance: The maximum distance the tracked Game Object To Change Rigidbody can be from the Game Object To Follow Rigidbody before the position is forcibly set to match the position.

Class Variables

  • public enum MovementOption - Specifies how to position and rotate the rigidbody.
    • Set - Use Rigidbody.position and Rigidbody.rotation.
    • Move - Use Rigidbody.MovePosition and Rigidbody.MoveRotation.
    • Add - Use Rigidbody.AddForce(Vector3) and Rigidbody.AddTorque(Vector3).
    • Track - Use velocity and angular velocity with MoveTowards.

Class Methods

Follow/0

public override void Follow()

  • Parameters
    • none
  • Returns
    • none

Follow gameObjectToFollow using the current settings.


Did this page help you?