This commit is contained in:
SoulliesOfficial
2026-01-03 18:19:39 -05:00
parent 3bcd7c1cf8
commit 33b1795c1f
7387 changed files with 2762819 additions and 716926 deletions

View File

@@ -1,36 +0,0 @@
/// ---------------------------------------------
/// Behavior Designer
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.BehaviorDesigner.Samples
{
using UnityEngine;
/// <summary>
/// Uses Rigidbody.MovePosition to move the Rigidbody.
/// </summary>
public class RigidbodyController : MonoBehaviour
{
[Tooltip("The amount that the rigidbody should move each FixedUpdate.")]
[SerializeField] protected Vector3 m_MoveAmount;
private Rigidbody m_Rigidbody;
/// <summary>
/// Initialize the default values.
/// </summary>
private void Awake()
{
m_Rigidbody = GetComponent<Rigidbody>();
}
/// <summary>
/// Moves the Rigidbody.
/// </summary>
private void FixedUpdate()
{
m_Rigidbody.MovePosition(m_Rigidbody.position + m_MoveAmount * Time.fixedDeltaTime);
}
}
}