Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 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 /
avatar image
0
Question by gekidoslair · Nov 10, 2014 at 02:40 AM · physicscharactercontrollermecanimcharacter controllerroot motion

Keeping characters within Fighting area

Howdy,

So have a bit of a custom / strange setup here.

1) I have an arena that 2 characters are fighting wtihin. I have box colliders setup all around the arena to theoretically keep the characters contained wtihin. The box colliders are simple, static nothing fancy.

2) characters are moved around via standard character controller component with root motion-based animations (via mecanim) being used as well. I do have ragdoll rigid body hierarchy setup on the characters, but that doesn't actually do 'anything' while mecanim is active...

All works perfectly fine, UNTIL I run into situations where the root motion animation projects the character(s) through the collision areas of the outer ring.

For example, we have a body slam or throw - the target (thrown) character might end up overlapping or outside of the ring after the root motion animation completes. Mecanim adjusts / resets the base transform / character controller fine to the characters new 'end position', but the collision / physics system doesn't seem to do ANYTHING about the resulting overlapped collision objects.

I expected that the physics system would 'correct' itself and at least attempt to keep the charactercontroller object so that it doesn't overlap with the main arena box colliders, but nothing seems to happen.

Any ideas?

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
0
Best Answer

Answer by gekidoslair · Nov 13, 2014 at 07:07 AM

Just ended up keeping a min/max bounds and checking the player's position. if it exceeds the min/max, then I slerp them back into position.

very annoying, still not sure why the collision system doesn't work in this scenario.

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 smit120 · Jul 28, 2015 at 03:47 PM 0
Share

I'm currently having a very similar issue. $$anonymous$$y collisions don't work even at the start of my game though. I do not have a character controller component on my character, but I do have a capsule collider attached. Not sure where to go next, but I think we could solve this problem together. I have been doing the same checking position and slerping as you but I refuse to believe this is the right answer for it.

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

26 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

Related Questions

CharacterController's collision rather off 0 Answers

Problem with CharacterController, Climb Animation, and Root Transform Position Y 1 Answer

[Mecanim] Turning animation doesn't rotate the whole way 1 Answer

CharracterController 1 Answer

Root Motion or CharacterController in FPS 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