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
0
Question by nirast · Jan 13, 2019 at 11:25 AM · gravitytreesclimbing

How to climb trees like a squirrel.

Hello, I need some help with a project I'm working on for my VR class. I've decided to make a "Squirrel Simulator", by I have no idea how to do the climbing on trees part. I was thinking of switching the gravity so the squirrel is attracted to the tree or the branch it's currently on, but I'm having trouble on how to make a fake gravity work on a cylindrical body.

Any advice?

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 ansirshadpk · Nov 24, 2020 at 07:02 PM 0
Share

can you please send me source code in which you make squirrel able to climb on tree i will be very thankfull to you.

avatar image nirast ansirshadpk · Nov 24, 2020 at 07:23 PM 0
Share

I'm so sorry, I abandoned that project a long time ago and I don't think I have the source code anymore. Didn't really solve anything, anyway.

In hindsight, you should probably find how similar climbing methods were implemented. Something like Raz's climb from Physchonauts would do it.

2 Replies

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

Answer by xxmariofer · Jan 13, 2019 at 11:47 AM

i would disable gravity or set it to 0 when you start climbing and create a vector in the fixed update from the center of the squirrel to the center of the tree (not taking into account the Y) for creating your custom gravity. You can then give the rigidbody a force or a velocity using that vector. @nirast

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 nirast · Jan 13, 2019 at 03:47 PM 0
Share

That did it, thanks

Edit: I was kinda rushing ahead. How would I do it for the branches? (I assume there's something to do with their x and z positions).

Edit 2: NV$$anonymous$$, I've actually managed to make it work.

avatar image
0

Answer by sh_code · Jan 13, 2019 at 08:52 PM

This is a non-trivial issue. (Why do you think the ability to climb trees was such a revolutionary feature in Assassin's Creed 3, even though it's still much more limited than what you're trying to do?)

The simplest thing I can think about is: when you touch the tree, disable gravity for the squirrel, and start adding a force to the squirrel which is precisely opposite to the normal of the surface of the tree that it's touching/trying to climb.

Also, next time, choose a homework you have at least SOME idea about how you're going to implement it.

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 nirast · Jan 13, 2019 at 09:21 PM 1
Share

I've actually managed to get something working, if you want, I'll update you on my progress or send you the source code once I'm done.

avatar image sh_code nirast · Jan 14, 2019 at 04:47 AM 0
Share

thanks, but to be honest, I'm not that interested. I'm happy you figured it out, though ;)

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

105 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 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 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 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 avatar image

Related Questions

wall climbing 0 Answers

Wall Walking / Vertical Climbing (+ Gravity!) 1 Answer

Can the Locomotion System be adapted to climb vertical surfaces? 2 Answers

Wall Climbing and Default Gravity 1 Answer

Grappling Hook 0 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