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
2
Question by Pilot · Jan 19, 2012 at 02:48 AM · gravitylocomotionclimbingclimblocomotion system

Can the Locomotion System be adapted to climb vertical surfaces?

I have been studying the old locomotion system tutorial recently and noticed that it should be quite simple to adapt it to work with vertical surfaces. Has anyone tried implementing this for a climbing system?

Here is how I would envision it working:

  • Setup your biped to work with the locomotion system and include the Physics Character Motor

  • Create a trigger near the required climbable vertical surface

  • When the character enters the trigger set the Centric Gravity of the Physics Character Motor on (have it disabled by default) allowing the character to walk across surfaces perpendicular to the ground

  • Change the animation from walking to climbing

  • At the top of the surface place another trigger which when entered sets the Centric Gravity back to off, allowing the character to properly interact with ground surfaces again

I've experimented with this in the Planet Walk example in the locomotion tutorial. Below is a screengrab without any animation changes. Has anyone else experimented with this, and if so how have the results been? Or am I wasting my time trying to get a setup like this working?

Locomotion Climbing

Note: I am not asking detailed advice on exactly how one would go about implementing this. Rather just basic advice and more importantly if it is actually possible, so I know whether I am heading in the right direction with my climbing system implementation. Thank you, looking forward to a reply.

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

2 Replies

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

Answer by UnityDeveloper99 · Feb 08, 2012 at 08:24 AM

Have to say I'm surprised there aren't more people trying this or at least asking about it. I've actually tried implementing a climbing system that works with the locomotion system, but it didn't end up being worth the effort.

1) First of all, as Rune suggested, the transition between walking mode and climbing mode (and vice versa) caused significant artifacts, limb twisting etc which proved a nightmare to try to control. One solution for this would be to have a completely separate control system for the climbing, which when initialized would disable the relevant locomotion scripts and take over control. However this leads to the second problem.

2) The benefit here of the locomotion system is that it semi-procedurally looks for height changes and adjusts the characters legs to match. In order to get this benefit for vertical motion, one would need to have a ladder built from colliders in order for the locomotion system to step on and off off. Doing this for an entire level is far too time consuming, even if using a ladder prefab. To get a good effect, every wall ladder needs to be aligned perfectly and tested extensively. The results are very good, but in my opinion not worth the effort and time, considering the other options available. Using just one box collider instead, would mean the character simply floats up the wall while in idle since there is no change in surface. This obviously defeats the purpose of using the locomotion system in the first place.

3) You could also try rotating the character, so that in theory they are walking horizontally but up and down instead of forward and backward, if that makes sense. I tried this too, but had issues with handling gravity. You could disable gravity completely while climbing, and enable when jumping or walking again. That may work but of coarse, then there's still the issue of handling the transition artifacts.

In summary then, I would advise not to use the locomotion system for vertical movement. If you want to use the locomotion system and have climbing as well, one option would be to create a separate control system for climbing and switch between them as necessary.

Lastly I would just like to add that I by no means am proclaiming to be "all knowledgeable" of the locomotion system. I'm simply sharing my experience and offering some (hopefully) helpful advice to an interesting question. If you have any more questions, let me know.

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 Pilot · Feb 08, 2012 at 08:37 AM 0
Share

I was quite surprised too actually. Thank you for your answer, the details were very helpful and made me realize a few new things I hadn't thought of.

avatar image UnityDeveloper99 · Feb 08, 2012 at 08:44 AM 0
Share

Just realized I hadn't talked about rotating the character. I'll add that now.

avatar image
3

Answer by runevision · Jan 23, 2012 at 09:57 PM

It's probably possible, but the solution sounds a bit messy. The Locomotion System was not made with non-horizontal source animations in mind, so the crawling animations would have to be crawling along a flat horizontal plane, and only afterwards could the whole model be rotated to climb vertically. I think getting the transitions between walking and crawling to look right without artifacts is probably going to be challenging.

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 Pilot · Jan 25, 2012 at 01:48 PM 1
Share

Sure I understand what you mean. I am really glad you saw my question as I feared no one else was really sure about this.

I have been testing this up until recently and the main problem I found was when using centric gravity on wall surfaces approximately 88 degrees or steeper to the walking surface (thus almost perpendicular). The character will only walk to the wall but not walk onto the wall. If I run up and jump towards the wall it will usually work better. The only way I have managed to get it working for walking is by attaching capsule colliders at edges where, for example, the wall and ground meet, or the wall and roof meet. This generally nullifies the steepness angle. I have tried adjusting the settings in the Leg Animator component, such as the step distance, step height, slope angle etc, but it doesn't seem to improve the effect.

Previously I tested the Planet Walk example with a quadruped and it worked perfectly. Since this motion is very similar to a biped in a crawling motion I thought it could be possible to implement this for a biped climbing system by simply steepening the walking surface. But it seems that this may not be the easiest solution for this.

Either way, thank you again for responding, it is always good getting advice from the person who knows the system the best. Appreciate 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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

climbing ladders script, help 0 Answers

How do the Locomotion System 'motion groups' work? 1 Answer

Understand how locomotation system works 1 Answer

Wall climbing spider 1 Answer

MatchTarget Help 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