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
5
Question by kathir · Oct 31, 2012 at 09:30 PM · collisionrigidbodytransformtrigger

Detect collision/trigger between two body without rigidbody?

Hiya,

Is it posible to detect colliion or trigger between two gameobjects which donot have rigidbody but have colliders with them.

I have a gameobject which moves, and I wish to detect collision when it intercepts another collider which does not have a rigidbody.

Funtions I use :

OnCollisionEnter()

OnTriggerEnter()

Game Scenario:

I did try to implement the above. The translating object has a collider and the target also has a collider. One is a capsule and the other is a box. Now I am trying to detect collision detection on translating object using OnCollisionEnter(Collision hit). I find absolutely no response.

I also found this link where they have tabulated a lot of stuff in regard to it. Is there a way to deal with it.

Constraints: I do not want the target objects to have rigidbody. I also do not want the translating object to have a rigidbody, but I could make a consideration on the translating object if I have no option. But I also do not want the two objects to collide with physics involved. It is just a matter of recognizing whether the target is within the translating object.

The code sample which is on the translating object could be found here.

Thank you :)

Comment
Add comment · Show 1
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 GeneralV · Nov 27, 2012 at 03:05 AM 0
Share

OnTriggerEnter() only works when your objects have rigidbodies attached.

3 Replies

· Add your reply
  • Sort: 
avatar image
16
Best Answer

Answer by aldonaletto · Nov 27, 2012 at 03:31 AM

You could add a rigidbody to the moving object and mark its Is Kinematic field, and mark Is Trigger in the other objects - this way the moving object would generate OnTriggerEnter events when touching the triggers, but there would be no physics reactions because kinematic rigidbodies aren't affected by physics.

Comment
Add comment · Show 2 · 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 yagizozturk · Apr 20, 2015 at 07:34 PM 0
Share

thanks alot alot alot

avatar image DroidifyDevs · Apr 04, 2016 at 12:49 AM 0
Share

Thanks spent a few hours banging my head on the wall till I came to this :-D

avatar image
2

Answer by Karsnen_2 · Nov 27, 2012 at 02:27 PM

Just like Aldo Naletto said. If you want more information this answer might help you.

http://answers.unity3d.com/questions/353199/is-it-okay-if-we-change-transformposition-on-a-kin.html

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 TonyIsaac.IT · Aug 13, 2013 at 01:45 PM

You can use Character controller instead of Rigid body

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

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

14 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Modifying height directly on a Rigidbody Object without gravity 1 Answer

Safe area from enemies 1 Answer

The trigger enter detect fast moving object more accurate 2 Answers

Need help with scripting bug fix. pleease 0 Answers

Acces to other object trigger thru other object script 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