- Moved video screen into its own separate movie tent. - Adjusted stable post-processing volume. - Chickens are now at full volume. - Added button to toggle chickens off and on.
23 lines
751 B
C#
23 lines
751 B
C#
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDKBase;
|
|
|
|
namespace Pyralix.SkeeBall
|
|
{
|
|
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
|
|
public class AddForce : UdonSharpBehaviour
|
|
{
|
|
[SerializeField] private float _Multiplier;
|
|
//this function is called every time the collider of the gameobject to which this script is attached...
|
|
//...collides with another collider
|
|
private void OnTriggerEnter(Collider obj)
|
|
{
|
|
if (Utilities.IsValid(obj) && obj != null && obj.GetComponent<Ball>())
|
|
{
|
|
obj.gameObject.GetComponent<Rigidbody>().AddForce(obj.gameObject.GetComponent<Rigidbody>().velocity.normalized * Time.deltaTime * _Multiplier);
|
|
}
|
|
}
|
|
}
|
|
}
|