This commit is contained in:
2026-06-09 09:18:17 +07:00
parent 3578a2750c
commit 71a096556a
5777 changed files with 6675 additions and 13 deletions

View File

@@ -1,44 +0,0 @@
/// ---------------------------------------------
/// Ultimate Character Controller
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.UltimateCharacterController.Demo.Objects
{
using UnityEngine;
/// <summary>
/// A particle stream crate will reset its position when the crate reactivates.
/// </summary>
public class ParticleStreamCrate : MonoBehaviour
{
private Rigidbody m_Rigibody;
private Vector3 m_Position;
private Quaternion m_Rotation;
/// <summary>
/// Initialize the default values.
/// </summary>
private void Awake()
{
m_Rigibody = GetComponent<Rigidbody>();
m_Position = transform.position;
m_Rotation = transform.rotation;
}
/// <summary>
/// The crate has been enabled.
/// </summary>
private void OnEnable()
{
m_Rigibody.linearVelocity = Vector3.zero;
m_Rigibody.angularVelocity = Vector3.zero;
transform.position = m_Position;
transform.rotation = m_Rotation;
}
}
}