- Home /
If my player is stopped the collision does not work. What's wrong?
Hello!
I use javascript, I created a function OnTriggerEnter for my player interact with the tag enemy. Works perfectly! But if the player is stopped and the enemy collide with him nothing happens until the player move(i not created boolean for movement). What is wrong?
sorry my bad english.
function OnTriggerEnter( other : Collider ) {
if ((other.tag == "Enemy") && (Attack == false)) { Rings = 0; inHurt = true; } }
Answer by LUKS123456 · Jan 19, 2014 at 02:25 AM
The answer is so obvious... My enemy was not a rigidbody.
hahaha! Works perfectly! =D
Your answer

Follow this Question
Related Questions
Unity Javascript Question 2 Answers
Need help with tilt in unity 1 Answer
How to use Farseer Physics (C# Package) in Javascript? 1 Answer
OnParticleCollison not being triggered 0 Answers
Why is the Document Outline View blank in MonoDevelop 4.0.1? 2 Answers