Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
This question was closed Dec 14, 2015 at 04:05 AM by Le-Pampelmuse.
avatar image
-1
Question by Totoajax · Dec 13, 2015 at 02:46 PM · jumprealityrealistic

Unrealistic jump in C#

I'm using this code as gravitation (can't change this):

Vector3 direction = dragTo.transform.position - transform.position; transform.position += direction * gravity * Time.deltaTime;

When I use:

transform.position += transform.up * speed * Time.deltaTime;

to jump my character does a very short and unrealistic jump. Can I do this in another way?

Comment
Add comment · Show 1
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 Le-Pampelmuse · Dec 14, 2015 at 04:04 AM 0
Share

Hi. This is a legitimate question, however it is not appropriate for Unity Answers and should not have been published from the moderator queue.

The reason is obvious:alt text

Quoting the FAQ:

  • There exist multiple duplicate questions with answers if you were to do a search, either on Answers or on the Forum.

  • Your question isn't specific enough: asking for a script, asking multiple questions in one post or asking a question that could be either subjective or require extensive discussion (and thus belongs in the Forum).

Or google in the first place.

Don't take this as a negative response, ins$$anonymous$$d take the hint to do searches beforehand. :) This will also save you time because you just have to read and not write something everytime. ;)

Have a nice day.

google.png (118.9 kB)
google.jpg (102.6 kB)

1 Reply

  • Sort: 
avatar image
0

Answer by TeohRIK · Dec 14, 2015 at 03:09 AM

Not sure you using Rigidibody component for your character or not.

If you using it, you can use force to simulate more realistic jump

 if(Input.GetKeyDown(KeyCode.Space))
             GetComponent<Rigidbody>().AddForce(Vector3.Up * Speed);

Scripting Reference: Rigidbody AddForce

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Make a rigidbody Jump (global up) 3 Answers

Multi-touch buttons 0 Answers

Problem with Jump Animation 0 Answers

How to make a simple jump script in 3D C# 1 Answer

My jumping in my game is inconsistent 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