- Home /
Question by
KrypTik_Sweller · Oct 19, 2020 at 02:06 AM ·
collisions
How to check if objects are colliding when not moving
so im making a game where it generates things randomly, and I need to be able to check if the object if colliding with anything with a certain tag. i already tried using the trigger thing it did not work since neither object is moving. I tried different on trigger options than just the on stay, no luck.
this is what I had:
void OnTriggerStay(Collider other)
{
BuildScript = (LevelBuilder)GameObject.FindGameObjectWithTag("Manager").GetComponent(typeof(LevelBuilder));
if (other.tag == "Room")
{
BuildScript.ResetLevelGenerator();
Debug.Log("End room colliding");
}
}
Comment
Your answer
Follow this Question
Related Questions
Tone down physics/collisions 2 Answers
Pixel Perfect Collision Possible? 3 Answers
Activate a GUI Text on Collision? 3 Answers
Objects 'Clumping' problem 1 Answer
Collisions layer is not appearing. 1 Answer