Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Nirvana33 · Sep 14, 2013 at 09:20 AM · collisioncollider

How to detech collision without rigidbody

Hello. I have a game object. I write a script. I wanna make collision detechtion without rigidbody. I try but isn't work.

Comment
Add comment · Show 2
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 vexe · Sep 14, 2013 at 09:24 AM 1
Share

Provide more info, show us your script, let us know what you're trying to do. Your question as it is, can't be answered.

avatar image Nirvana33 · Sep 14, 2013 at 09:46 AM 0
Share
 void OnColliderEnter(Collision collision){
 
         if (collision.gameObject.tag=="Point")
         {                
         point+=5;
         collision.gameObject.GetComponent<PointScript>().up=true;
         }

But it isn't work. How to i can make it without rigidbody..

2 Replies

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

Answer by vexe · Sep 14, 2013 at 09:53 AM

You want to walk in a collider area without using a rigidbody component attached to your game object?

Just use OnTriggerEnter and check isTrigger on your collider.

EDIT: Read this, and then this. To have collision between two of your objects one of them has to have a rigidbody component.

If you don't want your object to react with physics due to the fact that it has a rigidbody attached to it, just check isKinematic in the rigidbody component.

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 mirkobon · Sep 14, 2013 at 09:56 AM 0
Share

If answer helped please accept the anwer

avatar image sarahnorthway · Dec 27, 2020 at 02:46 AM 0
Share

From chart at bottom of Unity Docs, for OnTriggerEnter at least one collider needs a RigidBody, but it can be isKinematic if Collider.isTrigger=true. For OnCollisionEnter at least one collider needs a (regular, NOT kinematic) rigidbody. Confusing AF!

avatar image
3

Answer by MichLad · Oct 17, 2019 at 01:43 PM

I had problems with the collision. I manually set the position, but the rigidbody caused them to constantly move due to its physics. Vexe's solution didn't work since I didn't have said isKinematic checkbox. But it did lead me to the solution.

My solution:

In a script I set:

myRigidbody.isKinematic = true;

myRigidbody.useFullKinematicContacts = true;

I didn't have the isKinematic checkbox available in the editor. But I believe that setting Body Type from 'dynamic' to 'kinematic', and checking the 'use Full Kinematic Contacts' checkbox will have the same outcome.

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 Toscan0 · Apr 26, 2020 at 03:14 PM 0
Share

This is the right answer, the above one is incompleted. You need to set the rigidbody to Kinematic and set the "Use Full Kinematic Constacts" checbox to true. Here is a pic to help:alt text

screenshot-1.png (13.8 kB)

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

21 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

OnDestroy collision detect 4 Answers

Advice for Intersecting Colliders 0 Answers

Problem about collisions between the cubes. 2 Answers

Collision with cloth not working,Cloth component not working 0 Answers

How do I “freeze” an object after a collision? 3 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