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 /
avatar image
0
Question by job_123 · Oct 01, 2013 at 07:08 PM · jumpparabolic

parabolic jump

I am new to programming I tried many code and it is not working help will be great.when space bar key is released by player the player should jump in parabolic jump and the distance of the jump should be based on the how long player kept space bar button down parabolic jump should happen after player release the space bar and distance of jump should depend on how long player kept space bar down player should be able to press space bar only after player land on ground after parabolic jump I have asked this question like an essay please ignore and please help since I am new to unity all help will great to me

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 robertbu · Oct 01, 2013 at 07:14 PM 0
Share

In Unity there are three primary methods of moving an object: Rigidbody, Character Controller, direct manipulation of the tranfrom. Whoever answers this question needs to know how you are going to move your character, since answer is different depending on the movement method.

avatar image job_123 · Oct 02, 2013 at 01:48 AM 0
Share

I want to move the player either using character controll or rigid body since I want collision also work along with movement

avatar image robertbu · Oct 02, 2013 at 02:40 PM 0
Share

I think you need to do some research and be more specific with your question. The challenges of solving this problem for a character controller are different than solving them for a rigidbody. You need to consider other details, like do you want to get the distance by staying in the air longer, or jumping forward faster, or both. Let me give you a few things to consider and research:

  • In order to lock out jumping while in the air, you need some mechanism to detect if you are grounded. This comes for 'free' using a character controller, but you have to code it yourself for a rigidbody. There are lots of posts on detecting ground for a rigidbody.

  • You can deter$$anonymous$$e how long a key is pressed by recording Time.time on Input.Get$$anonymous$$eyDown() and subtracting it from Time.time on Input.Get$$anonymous$$eyUp().

  • Gravity is done for you when using a Rigidbody, but may have to implement gravity yourself for a character controller. See CharacterController.Simple$$anonymous$$ove() and CharacterController.$$anonymous$$ove(). Both have example scripts the one for $$anonymous$$ove() includes the implementation of gravity.

avatar image Owen-Reynolds · Oct 02, 2013 at 03:07 PM 0
Share

"Normal" jumps are parabolas. In other words, if you figure out how to set the starting up speed and forward speed, and apply gravity correctly as you move (or use a rigidbody and let Unity do the work,) you will get a proper parabolic jump.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Seizure · Oct 02, 2013 at 05:03 PM

Heres an example of a a ball jumping over an obstacle by pressing space.Space to jump


jump.zip (4.9 kB)
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

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

17 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

Related Questions

How do I lock Y Axis movement for Parented Camera? 3 Answers

making a jump button 2 Answers

Query on UnityScript Editor Features 1 Answer

How do I fix my player jumping code? 2 Answers

Move forward and jump using touchpad 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