Tanoda
simpleTest.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using UnityEngine;
4
5public class simpleTest : MonoBehaviour
6{
7 // Start is called before the first frame update
8 void Start()
9 {
10
11 }
12
13 // Update is called once per frame
14 void FixedUpdate()
15 {
16 if (gameObject.GetComponent<CapsuleCollider>())
17 {
18 bool firstCollided = false;
19 var targetPosition = gameObject.transform.parent.TransformPoint(gameObject.transform.position);
20 var itemRadius = 9999;
21 bool itemCondition = Physics.CheckSphere(targetPosition, itemRadius, 0);
22 //Vector3 fixedPosition = new Vector3();
23
24 if (itemCondition)
25 {
26 if (!firstCollided)
27 {
28 firstCollided = true;
29 //fixedPosition = to[i].transform.position;
30 }
31 //to[i].transform.position = fixedPosition;
32 Debug.Log("ütközéééééés");
33 }
34 else
35 {
36 firstCollided = false;
37 }
38
39 }
40 }
41}
UnityEngine.Debug Debug
Definition: TanodaServer.cs:19