• 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 Serellyn · Nov 23, 2020 at 02:32 PM · movementjumpparabola

Jump to position (Worms style)

Hey guys,

Currently working on a 3D side scroller and I'm trying to create movement for the player... kind of "Jumping" in the classic Worms games. So what I mean is, on button press the player needs to jump forward - let's say from Vector3(0.0, 0.8, 1) to Vector3(1.5, 0.8, 1) - in a parabolic fashion where it looks like that gravity makes sense. I will also need to be able to adjust the angle/duration of the forward jump/hop.


Your help will be greatly appreciated, have a great day.

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 thadstedman · Nov 23, 2020 at 03:03 PM 0
Share

Try this video if it's more 2D and change the vector2.up to a vector2 with a value of (1, 1) And you don't need any of the player base stuff or the animation stuff that's only for animations And at the top you don't need the using code monkey.Utill or Using V_animation system You only need to watch like the first four $$anonymous$$utes or so as well. Here's the link:https: //www.youtube.com/watch?v=ptvK4Fp5vRY&feature=emb_logo

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by thadstedman · Nov 23, 2020 at 02:51 PM

try this video but change vector3.up to your own vector3. The positions of that vector three should be (0, 5, 5) I think. Sorry if I'm wrong, if I am I will look into it more. Here is the link for the YouTube video: https://www.youtube.com/watch?v=vdOFUFMiPDU

Comment
Add comment · Show 8 · 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 thadstedman · Nov 23, 2020 at 02:52 PM 0
Share

Wait how can you have a 3-D side stroller??

avatar image thadstedman · Nov 23, 2020 at 02:53 PM 0
Share

If it's like 2D in 3D then that probably won't work So I'll find a tutorial for 2D jumping so you can fix it either way.

avatar image Serellyn · Nov 23, 2020 at 03:15 PM 0
Share

Haha, I love that realisation part you had. Thank you for your answer, I will look into that video tomorrow and come back to either accept your answer or ask for more help.

The 3d side scroller thing might be a bit vague, but... yes I guess it is...

avatar image Serellyn · Nov 24, 2020 at 02:57 PM 0
Share

So I've just tested a few things but the problem with this is that your suggestion just lets a rigidbody jump with a specific force. Which give the effect of jumping I want, but it does not guarantee a location to land. I want to jump from the middle of the block to the next block and land in exactly the middle.

avatar image myzzie Serellyn · Nov 24, 2020 at 04:26 PM 0
Share

You'll either have to look into the math behind trajectory prediction, e.g how much force in which direction is required to land exactly at x coord. Or you could cheat and use a quadratic bezier to create an arc between two points.

avatar image thadstedman · Nov 24, 2020 at 07:37 PM 0
Share

Here's an idea I had, if it's a length of 1.25 from the middle of one ground tile to the middle of the next then what if you change the vector2 from (1,1) to (1,1.25) for example.

avatar image thadstedman thadstedman · Nov 24, 2020 at 07:38 PM 0
Share

Wait no that's backwards I mean (1.25, 1)

avatar image thadstedman thadstedman · Nov 24, 2020 at 07:39 PM 0
Share

Because if you do that then it should move 1.25 across the X axis which should do it so you could change the Y axis to whatever you want depending how high you want to jump.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

207 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 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 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 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Trying to Add jump to this code. 1 Answer

Why won't my character jump,How do I make my character jump? 2 Answers

Smoothly Jump to mouse position 1 Answer

Simple Character Movement 1 Answer

Sphere get stuck in floor and fails to jump? 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