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 MattTheProgrammer · Nov 05, 2013 at 04:18 AM · physicsgravityjumpspeed

The faster my character goes the longer he jumps.

Hi I'm making a endless runner/Temple run type game. My only problem so far is that the faster he's going, The longer he jumps(The character speeds up as he gets farther). What can I do about this? Im using rigidbody for Jumping.

Comment
Add comment · Show 8
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 hdgam3r · Nov 05, 2013 at 04:21 AM 0
Share

Are you using the AddForce method? If so, what parameters are you sending to it?

avatar image Huacanacha · Nov 05, 2013 at 04:29 AM 1
Share

This is expected behavior from a Physics or $$anonymous$$athematical perspective of course. You have a few options I can see to work around this, each with consequences:

  1. Calculate how much force to apply to always land X meters from the start of a jump - jumps will be lower the faster the player runs

  2. Increase (or supplement) the Gravity force the faster he runs - player will go up and down faster which may look a little odd at really high speeds

  3. Always set the speed to a constant value whilst in the air - player slows down whilst airborne

This is as much a design decision as anything... you may even decide to stick with the current situation after evaluating the options.

avatar image MattTheProgrammer · Nov 05, 2013 at 08:11 AM 0
Share

Could you give me an example please @Huacanacha

avatar image Professor Snake · Nov 05, 2013 at 09:04 AM 0
Share

It would be great if you could include some of your code with the question, so we can see exactly what needs to be done.

avatar image ozturkcompany · Nov 05, 2013 at 10:19 AM 0
Share

Just get the velocity of your player by rigidbody.velocity.magnitude and calculate your desired speed at a point and make a if statement. If velocity is greater than your desired speed add a drag to your player or add a counter force. Hope this helps

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Litleck · Sep 14, 2017 at 01:49 AM

Can I see your script for this, I cant get much information from this.

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

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

The faster it goes, the longer it jumps 1 Answer

What is the best way to map the curve of a jump? 1 Answer

My jump script doesn't work every time 3 Answers

Constant speed when free-falling... Why?? 1 Answer

I have a planetary gravity script; how do I make the object speed up? 1 Answer


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