Import existing Unity project

This commit is contained in:
2019-09-19 20:47:29 +02:00
parent adf16435c5
commit fcc2c31771
56 changed files with 4627 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ForceZone : MonoBehaviour
{
public float force = 0;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnTriggerStay(Collider other)
{
Vector3 direction = other.transform.position - this.transform.position;
Debug.DrawRay(this.transform.position, direction);
other.transform.GetComponent<Rigidbody>().AddForce(direction.normalized * this.force * Time.deltaTime, ForceMode.Impulse);
}
}