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 May 17, 2015 at 11:13 PM by androids for the following reason:

I fix it

avatar image
0
Question by androids · May 15, 2015 at 12:06 AM · jumpdirection

jump to the direction of the getaxis

EDIT

I have a jump animation which I want to jump at the direction I want with the WASD keys, By example if I press the W + Space key, the jump animation will play and also jumps forward with a force. If I press the S + Space key, it will play the same animation but the character jumps backwards.

Someone who can help me? I'm using JS.

Thanks in advance

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 smallbit · May 15, 2015 at 09:42 AM 0
Share

Sorry not clear enough for me :) maybe you can provide some drawings?

avatar image androids · May 15, 2015 at 11:31 PM 0
Share

I've changed the question, I hope it's clear now

avatar image felixpk · May 16, 2015 at 11:56 AM 0
Share

what's the problem? use if-statements .. if(Input.Get$$anonymous$$ey("S") && Input.Get$$anonymous$$ey("SPACE")){ // play Animation // for example: rigidBody.AddForce(-1,2,0); } The syntax is not right, but you should know what I mean

avatar image androids · May 16, 2015 at 07:57 PM 0
Share

I want to use the getaxis ("horizontal") and ("vertical").

1 Reply

  • Sort: 
avatar image
0

Answer by fahimalavi · May 17, 2015 at 03:10 PM

1) Play animations 2) Use following code Vector3 movement; movement.Set (lh, 0, lv); //0 due to no flying zone ;) movement=movement.normalized *6*Time.deltaTime; // 6 is speed PlayerRigidBody.MovePosition(transform.position+movement);

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 androids · May 17, 2015 at 11:13 PM 0
Share

Thanks for your answer, but I figured it out with a better and a simple solution :)

Follow this Question

Answers Answers and Comments

22 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

Related Questions

In air direction control 4 Answers

Jumping with force in forward direction 2 Answers

Character controller get velocity.y direction ? 1 Answer

My character can no longer jump and my enemies do not turn direction. Still new to Unity. 0 Answers

Apply gravity to my character through script. 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