Hi, I have an enemy that creates areas that hurt you. I use an OnTrigger function, but if the area that is created occupies the same place as the character (and if he doesn't move), he remains unhurt. Any ideas to correct this?
May 29 '11 at 09:57 AM
May 29 '11 at 10:38 AM
Code would be extremely helpful.
Are you using OnTriggerStay()? I'm not sure if OnTriggerEnter() works if you instantiate a trigger around a whole object, it might not register the actual entry.
Have u attached collider to this area and set it as a trigger?
Yup, code would be most helpful!
May 29 '11 at 12:34 PM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
The best place to ask and answer questions about development with Unity. Check out our FAQ for more information.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
asked: May 29 '11 at 09:57 AM
Seen: 1278 times
Last Updated: May 29 '11 at 12:34 PM
How to get my targeting system working correctly
Performance difference between OnCollision and OnTrigger messages?
DroppableMover Referenced - 3DPlatformer
Create an array of gameobjects in trigger?
Why is this code giving me an error... lots of them
OnTriggerEnter only working once.
onTrigger functions in disabled script
Alternate for OnTriggerExit???
Play and stop sound using OnTrigger