Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by Santa · Sep 28, 2010 at 05:38 PM · collisiontriggercharactercontroller

OnTrigger events on CharacterController in Unity 3

With moving project to Unity 3 detection of trigger collisions with CharacterController start working strange. There is one object with box collider which is trigger and other object with CharacterController. And events OnTriggerEnter and OnTriggerStay happen only if the character is moving. If it stands still there are no collisions. In Unity 2.6 absolutely the same project works fine.

Where could be problem?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by schlumpu · May 10, 2011 at 01:00 PM

Try adding a RigidBody to the triggering object.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Landon · Nov 04, 2010 at 04:55 AM

I got the same problem! If the CharacterController game object stoped, others can not detect it.

Is there anybody can help us?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tylo · Mar 27, 2011 at 02:15 AM 0
Share

You guys may want to upvote the question so it gets more attention.

avatar image
0

Answer by barbur · Feb 02, 2011 at 03:45 PM

I have the same problem!! Any news on this one?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tylo · Mar 27, 2011 at 02:15 AM 0
Share

You guys may want to upvote the question so it gets more attention.

avatar image
0

Answer by 1stIssue · Sep 21, 2011 at 02:46 PM

okay, so I'm gonna write my script down, which works. I'm standing inside a trigger, and everytime I'm pressing "E" or pushing a button, I can do it again, so it pops up again.

private var showDialog:boolean = false ; private var keyPressed:boolean = false ; private var doQuest:boolean = false ; public var enemy:GameObject;

function Update () { if(Input.GetKey(KeyCode.E)) { keyPressed = true ; } }

function OnTriggerStay (collisionInfo : Collider) { if(collisionInfo.gameObject.tag == "Player") { showDialog = true ; } }

function OnTriggerExit () { showDialog = false ; keyPressed = false ; }

function OnGUI() { GUILayout.BeginArea(Rect(20,80,200,200)); if (showDialog&&!doQuest&&keyPressed){ GUILayout.Label("Hallo, ich heisse Manfred!"); GUILayout.Label("Wie ich sehe, wirst du verfolgt. Soll ich meinen Roboterkollegen ausschalten?"); if (GUILayout.Button("Ja, bidde.")){

             doQuest=true;
             keyPressed = false ;
             enemy.GetComponent("AIEnemy").enabled = false;
             enemy.GetComponent("Animation").animation.Play("idle");
         }
         if (GUILayout.Button("Nein, ich mach das schon.")){

             keyPressed = false ;
         }       


     }   
     if (showDialog&&doQuest&&keyPressed){
         GUILayout.Label("Wenn du willst, kannst du ihn jetzt treten, er wehrt sich nicht ;)");
         if (GUILayout.Button("Na dann mal los.")){          

             keyPressed = false ;
         }
     }
     GUILayout.EndArea();

}

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image syclamoth · Sep 21, 2011 at 03:01 PM 0
Share

But, the basic premise of the initial question was that that didn't work!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Bullets colliding with Character Controller 3 Answers

How to fix the position of a character when grabbing a rope? 1 Answer

CharacterController with BoxCollider 1 Answer

How to have other (any) Objects smoothly push a Character Controller? 1 Answer

How do I detect when two CharacterControllers collide? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges