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 abdelrahmanyoussry509 · Aug 05, 2020 at 07:43 AM · scripting problemwallhow-tohow tomechanics

How to Walljump? (3D) Need Help!

-hi i am trying to make my player to be able to jump from a wall to the oppsite wall from like a 45 dgree angle (like mirror's edge gameplay) so he jumps from wall to wall without touching ground.

-you see i managed to make my player wallrun then jump but he jumps straight up i want him to jump from the side at a 45 dgree angle.

-if you figured out how to fix it please explain it to me since i am new and dumb THANK YOU

here is the code that makes player jump up:

  if(isRuningLEFT && Input.GetKeyDown(KeyCode.Space) || isRuningRigh && Input.GetKeyDown(KeyCode.Space))
         {
             rig.AddForce(Vector3.up  * 20, ForceMode.Impulse);
             print("jumped");
             
         }

and here is the entire script for the wallrun if you need to know:

  //Wallrun code
         if (isGorunded)
         {
             jumpCount = 0f;
         }
         
         if (remove == 1 )
         {
             if (Physics.Raycast(transform.position, transform.right, out HitRIG, 1))
             {
                 if (HitRIG.transform.tag == "Wall")
                 {
                     isRuningLEFT = false;
                     isRuningRigh = true;
                     jumpCount += 1;
                     rig.useGravity = false;
                     rig.AddForce(100, 0, 0);
                    
 
 
                 }
 
             }
             else if (Physics.Raycast(transform.position, -transform.right, out HitLEF, 1))
             {
                 if (HitLEF.transform.tag == "Wall")
                 {
                     isRuningLEFT = true;
                     isRuningRigh = false;
                     jumpCount += 1;
                     rig.useGravity = false;
                     rig.AddForce(100,0,0);
 
 
 
                 }
 
 
 
             }
             
             else
             {
                 isRuningLEFT = false;
                 isRuningRigh = false;
                  rig.useGravity = true;
                 
             }
             
         }
         if(isRuningLEFT && Input.GetKeyDown(KeyCode.Space) || isRuningRigh && Input.GetKeyDown(KeyCode.Space))
         {
             rig.AddForce(Vector3.up  * 20, ForceMode.Impulse);
             print("jumped");
             
         }
         
         
        
         
     }
 
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
1

Answer by davidcox70 · Aug 05, 2020 at 09:35 AM

Did you try the solution I suggested in your other post about this issue?

https://answers.unity.com/questions/1758153/how-do-i-make-my-player-jump-from-an-angle-wallrun.html?childToView=1758186#answer-1758186

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 abdelrahmanyoussry509 · Aug 06, 2020 at 07:01 AM 0
Share

oh that was weird i was never notified with your response that was weird thank you

so i tried it and the play was still jumping up it did not work i tried even changing the values still did not work

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

237 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 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 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

Multiple Cars not working 1 Answer

How to make good driving mechanics? 0 Answers

How to Add an Individual Kill Count to Different Weapons 0 Answers

Jump with a wallrun 0 Answers

Temporary GameObject Movement 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