• 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
Question by Figalot · Jan 01, 2011 at 01:52 PM · 2d3djump

Wall Jump script

Im making a 3d game on a 2d plain, i have a moving character who can jump but im looking for a wall jump stlye script. But i am a terrible at code the best i can do is figure out wrong syntax so i was wondering if any one could point me in the right direction on how to make one?

Comment
Lance

People who like this

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

Answer by hypnoslave · Jan 01, 2011 at 06:58 PM

sorry, but You're going to have to code it. There's really no way around learning to code in unity.. Thankfully however, it's an amazingly easy way to start learning how to code.

my first (and verryyyy hacky) project, "I am the night", (http://www.greenergrassgames.com/iamthenight) used wall jump this way:

first of all, i used a switch in my code to build a state machine to track the player's current state (grounded, airborne, wallsliding)

the character had a box colider that stuck out in front of him a tiny bit, and that followed him around. this was set to "use trigger". if this trigger object ran into an object tagged as "wall" while the character was in his "airborne" state, AND the player pressed against or away from the wall with his arrow keys, the character would enter a "wallsliding" state -- where he quickly flips around 180 degrees, plays a "i'm sliding down a wall" animation and falls down vertically very slowly. if the user hits jump in this state, the character springs away from the wall with a simple add force function and plays a wall-jump animation. he then goes into the airborne state, ready to hit another wall.

hope that isn't too confusing. there are probably better ways to do it.

Comment
Lance

People who like this

1 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 Nicolinux · Jan 15, 2012 at 03:16 AM 0
Share

How do you make the character stick to the wall and slide down slowly? Normally I would get the collision contact point, invert the normal and add a constant force in that direction. However I have rotating wall and I dont't know how to make the player slide down slowly (wherever "down" is while the wall rotates).

avatar image

Answer by Justin Warner · Jan 01, 2011 at 05:10 PM

If you want him to "Climb" over the wall, your going to have to animate it...

But you might want to define: wall jump.

Happy new years, and hope this helps =).

Comment

People who like this

0 Show 0 · 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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

2D sprite that always faces the player? 1 Answer

Find distance within screen! 2 Answers

Advice needed on my first c# 2D jump script 1 Answer

Camerascript works strange! 0 Answers

Making a character jump with the Character Controller Component instead of Capsule Collider 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