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 /
This question was closed Apr 14, 2013 at 06:59 AM by Fattie for the following reason:

Duplicate Question

avatar image
1
Question by Dreave · Apr 08, 2012 at 11:33 AM · jumpsimplewall

Simple wall jump?

Im trying to make my character do sort of a double jump if it is facing a wall and if the player has pressed the spacebar twice. Ive looked around for an answer for this but they are all to confusing for my little brain to make sense of, can anyone help me out?

Comment
Add comment · Show 4
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 OzzyRawrz · Apr 08, 2012 at 02:02 PM 0
Share

Can you show me the script you're using for just double jumping by pressing "space" ?

avatar image Dreave · Apr 08, 2012 at 04:46 PM 0
Share

I dont have a double jump script, what I meant was for the character to do a double jump if it is facing a wall or not.

avatar image OzzyRawrz · Apr 08, 2012 at 07:19 PM 0
Share

I guess this will help you http://spetools.de/code/aafceeac2b95ae7f86f8d684e8212036

avatar image Dreave · Apr 08, 2012 at 07:38 PM 0
Share

this is for a side scrolling game, $$anonymous$$e is an fps free roa$$anonymous$$g sort of game.

2 Replies

  • Sort: 
avatar image
0

Answer by OzzyRawrz · Apr 08, 2012 at 03:08 PM

First make an empty object and place it in the Player as a child then give a Box collider to the emptyObject Then Try using this script in the EmptyObject for Double jumping when the player face the wall.

 var Player : Transform;
 var FacingWallorNot : int;
 
 function Update () {
 
           if(FacingWallorNot == 1){
              var PlayerMovement = Player.GetComponent(PlayerMovementAndJumpingScript);
              //Change the variable in the PlayerMovementAndJumpingScript here using "PlayerMovement.[VariableName] = [number value you want it to change];
             }
     
     }
 
 function OnTriggerEnter(other:Collider){
    
    
     if(other.gameObject.tag == "Wall") {
            FacingWallorNot = 1;
         }
 }  
    


Put a "Wall" tag on the wall object.

Comment
Add comment · 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
0

Answer by cowasockytommy · Apr 14, 2013 at 06:58 AM

use a ray cast

Comment
Add comment · 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

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

A node in a childnode? 1 Answer

Simple wall jump 0 Answers

Wall jump need help!!!!! 1 Answer

Character does not jump 1 Answer

What is the simple way of applying Texture Atlas to Unity 3 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