вот код:
Синтаксис:
Используется csharp
using UnityEngine;
using System.Collections;
public class test : MonoBehaviour {
public Transform MainBody;
public Vector3[] thrusters;
public float size_thrusters;
public float size_ray;
void FixedUpdate (){
RaycastHit hit;
int i = 0;
Vector3 direction = MainBody.transform.TransformDirection(Vector3.down * size_ray);
Debug.DrawRay(MainBody.position,direction,Color.red);
for (i = 0; i < thrusters.Length; i++) {
Vector3 Thruster = transform.TransformPoint(thrusters[i]);
}
}
void OnDrawGizmos (){
int i =0;
for (i = 0; i < thrusters.Length; i++) {
Gizmos.DrawWireSphere(transform.TransformPoint(thrusters[i]), size_thrusters);
}
}
}
using System.Collections;
public class test : MonoBehaviour {
public Transform MainBody;
public Vector3[] thrusters;
public float size_thrusters;
public float size_ray;
void FixedUpdate (){
RaycastHit hit;
int i = 0;
Vector3 direction = MainBody.transform.TransformDirection(Vector3.down * size_ray);
Debug.DrawRay(MainBody.position,direction,Color.red);
for (i = 0; i < thrusters.Length; i++) {
Vector3 Thruster = transform.TransformPoint(thrusters[i]);
}
}
void OnDrawGizmos (){
int i =0;
for (i = 0; i < thrusters.Length; i++) {
Gizmos.DrawWireSphere(transform.TransformPoint(thrusters[i]), size_thrusters);
}
}
}
Помогите пожалуйста и спасибо!