Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 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 /
  • Help Room /
avatar image
0
Question by Lukx31 · Feb 07, 2016 at 01:34 AM · collidermousedragmousedown

Two Colliders in One GameObject

Hey, i have a box that has 1 box collider, this box collider is used so the player can drag this box, and this box will collide with other objects, so basically the player changes the box position, and hit it with a ball.

But i want to make one collider to the movement and one collider to "collision".

So i can make the movement collider bigger and it will be easier for the player.

Thanks

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 mateo4632 · Feb 07, 2016 at 03:44 AM 0
Share

What exactly is it that you need help with? Adding two colliders to one object, or a script so the player can drag the box around?

avatar image Lukx31 mateo4632 · Feb 07, 2016 at 04:37 AM 0
Share

I have the script that the guy can move, but i want to have a bigger collider so the player can drag the box without pressing just IN the box. But if i make the collider bigger, the ball that hits this box, will hit in this collider thats too big.

So i need one collider big, so the player can press outside the box and mode the box, and a normal size collider just being a collider.

Thanks again

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by itsharshdeep · Feb 07, 2016 at 05:18 AM

Hi

I think that will be fine if you place 2 collider one for each functionality. But I have one question that how you will distinguish with one script on a single gameObject that 'A' collider is for touch and 'B' is for collision detection ...???

So I think you need to create an empty child gameObject which either detect collision and another one will be determining touch movement.

Hope I answered correctly ;)

Comment
Add comment · Show 3 · 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 Lukx31 · Feb 07, 2016 at 04:21 PM 0
Share

oh, so I would need to create like a copy of the object and make it a child, and then in this child i put one of the scripts (for example the mouse drag one), and i make this one a big collider, and in the normal one i just leave the way that it is.

I will try that, thank you very much

avatar image Lukx31 · Feb 07, 2016 at 05:32 PM 0
Share

ohh it worked, thank you very much.

avatar image itsharshdeep Lukx31 · Feb 07, 2016 at 06:49 PM 0
Share

Hehe...thanks a lot

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

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

Related Questions

Box Collider for animating characters. 0 Answers

How to use Animation Event in this case ? 1 Answer

How do I make onCollisionStay work? 1 Answer

Raycast with image over collider 0 Answers

How to prevent a sphere collider to go through a box collider 1 Answer


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