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
0
Question by Ashkan_gc · May 29, 2010 at 10:46 AM · collisionraycastcollider

using multiple colliders for a gameObject and it's children

i have a boxer in my game. it has a root boxer gameobject and some children for it's mesh and skeleton (bones). i made two sphere gameobjects with sphere colliders for his fists and another for his head to detect punchs on his head. now i want to move it using raycasting so i attached a big box collider that covers his hole body. this collider is attached to the roo boxer gameobject bu raycasts don't detect it. why? when i replace it with a sphere collider it will be detected but other colliders don't work. this big collider will cover other colliders too and they are inside it. is there any problem in my setup or just unity has a bug or ... i tested some other combinations and changed are child sphere colliders o fists and head to box and then it worked well. the big collider of the root boxer object now works with box and sphere but don't work with capsules. i did not have the time to change all children to capsule but i think then it will work with sphere and capsule for the root object when you raycast. i submited this to UT as a bug but i don't know can i put the bug report link publicly availabl here or not.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by spinaljack · May 29, 2010 at 12:36 PM

Any colliders will block rays, what you need to do is either use physics raycast all to return a list of all hits and find the desired collider with tags or (faster way) put the colliders into different layers and have the rays only detect the relevant layer.

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 Ashkan_gc · May 30, 2010 at 03:41 AM 0
Share

i raycasted using raycastall but it don't detect the collider. iknow the api. as i said it works well with a sphere collider but don't work for a box collider

avatar image spinaljack · May 30, 2010 at 06:44 PM 0
Share

your question is hard to read, consider posting what scripts you've used

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

No one has followed this question yet.

Related Questions

Surface with hole and Raycast - Which collider 1 Answer

Prevent shooting when gun is inside wall 1 Answer

Make Ray hit own collider 1 Answer

Raycast Not Drawing In Target Direction 0 Answers

How can I make diagonal collisions work with raycasts from a boxcollider? (3D, C#) 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