I need to have moving GameObjects and I need them to be destroyed when they enter another GameObject.
To be able to detect when they enter the trigger, it seems they need to have RigidBody. I set IsKinematic so physics are not applied.
Please note I would prefer not to use RigidBody, but it seems impossible to easily detect if the GameObject enters the trigger otherwise…
Now the problem is when I have 2 objects with RigidBody, the GameObjects move but not the render.
Here’s a screenshot of properties of one of the GameObjects and the GameObject they will enter
Code for the EnemyController
using UnityEngine;
using System.Collections;
public class EnemyController : MonoBehaviour
{
public float velocity = 0f;
void Update()
{
transform.position += new Vector3(0, 0, velocity * Time.deltaTime);
}
}
I need advice on how to set this up properly. Going mad over here… Thank you!