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
1
Question by vivekkalkur · Feb 07, 2013 at 01:43 PM · gameobjectboxcollider

BoxCollider not moving along with the gameobject

I have attached a boxcollider to the gameObject and whenever I swipe up(vertically) the gameObject,the object moves to a certain height but the collider tends to be on the ground itself. What is the possible reason for it and how can I solve this.

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 gamerant · Jul 08, 2013 at 11:41 AM 0
Share

That sounds a bit weird.I'd say try checking if your collider is actually part of your game object.Or you can create an empty game object call it something like "boxCollider" and then attach the box collider to it.$$anonymous$$ove your created empty game object over your actual object and make the "boxCollider" a child of your main game object.

avatar image amphoterik · Jul 08, 2013 at 11:53 AM 1
Share

A box collider is a component, not an object. It doesn't have its own transform. Therefore, it cannot be moved separately from the object it is attached to (it can only be offset via script or inspector). Something is going on that isn't as you described it. Are you using any scripts?

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by zzeeshann · Jun 06, 2016 at 07:15 AM

If you are using animation add the collider to the child of the mesh e.g Hips

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
1

Answer by advancexz · Aug 31, 2016 at 07:56 AM

I know its an old thread, but I had a similar issue with BoxCollider2D and the thing was that my collider was a child with a RigidBody2d, I just removed the RigidBody and problem solved.

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 spencerz · Feb 14, 2020 at 08:47 PM 0
Share

Hey I know this is an old comment.. but you solved my problem - thank you!

and thank you OP for asking this specific question.

avatar image
0

Answer by $$anonymous$$ · Jul 08, 2013 at 02:01 PM

Ok so I assume that you didn't describe everything we needed to know. But don't worry I'll try to help you. Just follow the steps on moving the Gameobject with a box collider upwards.

Step 1: Click 'Add Component' then --> 'Physics' then --> 'Box Collider'

alt text

Step 2: Drag the object around and the Box Collider moves with it because it is a Component

alt text

Step 3: Works with multiple objects too :P

If this doesn't work well then you have a problem and need to read completely this page http://docs.unity3d.com/Documentation/Components/class-BoxCollider.html . Please if you liked my answer, check out our alpha game that's coming out this Wednesday at http://humanityfalling.weebly.com/ . Please join us if you want.


add component.jpg (84.9 kB)
drag around.jpg (53.8 kB)
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

13 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

Related Questions

collisions in character not working! 2 Answers

How to make box collider same size as gameobject 1 Answer

using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers

Spawn moving GameObjects with identical gaps! 1 Answer

BoxCollider error with nothing wrong? C# 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