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 Arbbot · May 26, 2010 at 07:16 PM · collidercharactercontroller

Quadrupeds Character Controller

Is there a Character Controller equivalent for Quadrupeds?

My main character and NPCs are quadrupeds animals. I have been using the Character Collider, but the problem is that the player and the NPCs can stick their heads or tails into other characters, which I want to avoid. I tried adding Box colliders to the GameObjects, but they don't seem to work. Is there any way to change the default Character Controller collider shape? like changing the default capsule for a box collider?

Is there another way to solve this? Mesh colliders? Box colliders? Can I have both the Character Controller component and a Box Collider at the same time in the same GameObject? Is there any difference if the secondary Box Collider is attached to a child object of the one that has the Character Collider? What would I need to do at scripting level to make it work?

Any help is more than welcome.

Thanks

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

3 Replies

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

Answer by Arbbot · Jun 14, 2010 at 06:18 PM

After a really deep research on available options, the only solution I found is to sacrifice Top collisions accuracy to have side collision accuracy. This means that you can still use the CharacterController standard Unity component, and just make it a lot taller than the actual model. This will give you a better shape for side collisions although the CC collider will be a lot taller than the model, which means that top collisions will not be accurate, but at least this works fairly well. By the way, locomotion does not solve this problem, and it doesn't have anything to do with the actual CharacterController colliders. It actually uses the same Unity CharacterController component.

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 UNKNOWN · Nov 24, 2012 at 03:11 PM 0
Share

@$$anonymous$$ Pasek Thank you. Your option helped solve my problem. I just $$anonymous$$imized the Character Controller x,y,z all to 0 and attached empty object as a child. Then added box collider to it and resized it to be same as its parent. Wel Done. :)

avatar image
0

Answer by equalsequals · May 26, 2010 at 07:28 PM

I believe that it's only 1 Collider per GameObject. (If you try attaching a BoxCollider to an object that has a CapsuleCollider already, it'll prompt you to replace) However, that does not stop you from having sub-GameObjects that are just Colliders. That is a completely acceptable way of setting things up on your character.

MeshCollider objects will not collide with other MeshCollider objects, only primitive Colliders (Box,Sphere,Capsule... etc) unless marked convex.

--On a personal note I have found convex Colliders to act a little wonky in some instances, so avoid them if you're not familiar with how all of this stuff works.

Hope that helps.

==

Comment
Add comment · Show 6 · 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 Arbbot · May 26, 2010 at 08:05 PM 0
Share

Thanks for your comment. I have my player GO with my Character Collider. Then, as a child object I have my animal model with a box collider attached. The box collider is a little bigger than the actual model mesh, which is fine. However, I can still stick the head on the animal into other objects and characters. What else do I need to do in order to avoid this? Do I need to check for the model's box collider collisions in my Third Person Controller scripts? I'm not sure if the Box Collider generates the collisions by default, or if I need to check for them in my TPC.

Thanks

avatar image Arbbot · May 26, 2010 at 08:24 PM 0
Share

Just to clarify: I have my "player" GO with a Character Controller attached to it (with its capsule collider). Then, as a child object, I have an empty GO with a box collider that covers the space of the child GO that contains the model mesh. But it doesn't solve the issue. What do I need to do to get the BoxCollider collisions right?

  • Player GO (character controller)

  • Collider Container GO (box collider) --- $$anonymous$$odel GO (mesh)

Thanks

avatar image equalsequals · May 26, 2010 at 08:56 PM 0
Share

Unity will handle all the collisions for you, the only way the tails/heads will come in contact with anything outside of the encapsulating Collider is if A) part of the mesh protrudes from the Collider B) The object it is clipping with does not have a Collider encapsulating it entirely.

avatar image Arbbot · May 26, 2010 at 09:38 PM 0
Share

Still not working. - Player GO: has a Character Controller with the capsule collider it comes with it. The capsule collider is smaller than the child GO containing the animal model $$anonymous$$esh. -- BoxCollider Container GO: child of the player GO with a Box Collider bigger than the child object containing the animal model mesh. --- Animal $$anonymous$$odel GO: contains the animal model mesh.

avatar image Arbbot · May 26, 2010 at 09:38 PM 0
Share

At the higher level I'm using a character controller. And in the child object I have the box collider (isTrigger = false). But still, when the player gets near other characters, I can still stick my head into the other characters, which shouldn't happen. Both characters, the player and the NPC have a character controller, and both of them have a child object with a big box collider.

Show more comments
avatar image
0

Answer by Tetrad · May 26, 2010 at 07:29 PM

http://answers.unity3d.com/questions/9104/equivalent-to-character-controller-for-quadrupeds

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 Arbbot · May 26, 2010 at 08:06 PM 0
Share

I already saw this thread, but as far as I understand, the locomotion system doesn't solve the character collision problem. Am I right?

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

1 Person is following this question.

avatar image

Related Questions

Player falls through floor after 10-20 seconds and above certain resolution consistantly(Bug?) 5 Answers

Character - Collider With Scene 0 Answers

CharacterController Physics 1 Answer

Character Controller's Collider Restricting Other Colliders 1 Answer

Make Character Controller a Box? 2 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