Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
3
Question by straydogstrut · Apr 30, 2010 at 04:20 PM · collidercharactercontroller

Equivalent to Character Controller for Quadrupeds

Hi all,

The player character in our game is a wolf and he has to navigate a Unity terrain with hills, rocks and trees etc. Since we can't rotate the character controller, what is the recommended method for putting a collider on a quadruped?

At the moment we're using the FPSWalker script to move the character around. We'd like to keep the same functionality, so i'm guessing we have to use something like a box collider and write a custom script? This shouldn't be a problem, but i'm thinking there might be issues when going up/down slopes, so maybe something like a capsule collider would work better?

I'd be keen to hear how other people have approached this.

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
4

Answer by Cyclops · May 16, 2010 at 03:53 PM

Are you aware of the Locomotion System? As far as I know, it also works with quadrupeds.

Update: the Documentation says:

  • Ground Hugging for Non-Bipeds
    Creatures with more than two legs support their weight differently than humans and other bipeds. The Locomotion System has two simple settings to handle that [...].

and includes a Coyote model for example.

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 straydogstrut · May 16, 2010 at 05:31 PM 0
Share

Hi Cyclops, thanks for the suggestion. I knew about the Locomotion System but it completely slipped my $$anonymous$$d lately!=S I didn't know if it could be used with quadrupeds though, i'll have a play with it tonight and report back. Cheers.

avatar image straydogstrut · May 16, 2010 at 06:03 PM 0
Share

Brilliant! I feel really silly now since our tutor at uni was running around with a coyote but I thought it was a tech demo he'd found online, I didn't realise it was part of the Locomotion System. Sheepishly slinking away now, silly me.

avatar image Cyclops · May 16, 2010 at 06:14 PM 0
Share

Slinking away without upvoting? tsk, tsk... :)

avatar image straydogstrut · May 16, 2010 at 06:16 PM 0
Share

Whoops! Consider yourself upvoted;-) I'll complete the question once I implement the Locomotion System tonight. Thanks again.

avatar image Cyclops · May 16, 2010 at 06:24 PM 0
Share

Heh. Likewise thanks, and good luck locomoting...

Show more comments
avatar image
1

Answer by jester · Apr 30, 2010 at 10:45 PM

i haven't used the character controller yet but my first thought would be to try two sphere colliders, one set to cover the hind legs/body and one for the front legs/body. drive the wolf by moving the forward collider and then let the rear one just follow along, possibly attached by a very stiff spring. that should keep the rear legs from falling through terrain and orient them properly when going up/down hills. swap ccontrol to the rear legs if you want him to be able to walk backwards.

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 straydogstrut · May 01, 2010 at 10:44 AM 0
Share

Thanks jester, that's an interesting solution I hadn't considered. I messed around with box colliders and capsule colliders yesterday (adding a rigidbody to quickly get collision going, with comical results!), but I still had the problem of aligning the wolf to the terrain properly. I'll attempt your method when I get a chance and report back. Thanks.

avatar image Arbbot · May 27, 2010 at 12:15 AM 0
Share

$$anonymous$$ake sure to work out the CC collider center, so you can move the collider up or along the X and Z axes. This helped me a lot. Check out my answer regarding what I did to solve the collider...although is not the perfect solution, it might help you.

avatar image
0

Answer by Arbbot · May 26, 2010 at 07:55 PM

Hi all,

Great information, but the Locomotion System actually used the default Character Controller with the default capsule collider. If you download the project and add a cube in the scene, you will notice that you can stick the Coyote's head into the cube.

After digging all around the Internet, including Unity official forums and answers, and even Thesis studies of Computer Animation Graphics using Unity, it seems that there's no way around the Character Controller default Capsule Collider. Either you don't use it at all, and use a primitive collider and create your own scripts, or use the default Character Controller.

Now the trick that kind of works, is to modify the default capsule collider to be very high and have the radius cover your model mesh. You need to make sure the capsule's height is high, otherwise characters will be able to walk over the CC capsule. This way you get better side collisions, sacrificing top collisions precision.

Let's hope that in Unity 3 we can modify the capsule to make different shapes, to match not only humanoid forms, but also animals and crazy shaped creatures.

Cheers!

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

No one has followed this question yet.

Related Questions

When jump my character controller model it goes out of collider 0 Answers

Character Controller Object Randomly Falls Through Colliders 3 Answers

3D combat in Unity 2017 3 Answers

OnTriggerEnter() and OnCollisionEnter(), OnControllerColliderHit() not working with character controller 2 Answers

Why can't I use CharacterController and a BoxCollider simultaneously? 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