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 pintee · Oct 01, 2012 at 08:18 AM · curvetrajectoryeasing

Curved trajectory + easing

I want to make an object follow a curved trajectory through the air, only towards the end of the curve i want it to ease to a stop. How do I do this? I tried fiddling around with forces but it doesn't give me the effect i want. Searching on google throws up bezier curves and itween, but im not sure if thats applicable to what i want.

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 Fattie · Oct 01, 2012 at 10:24 AM 0
Share

it's neat that you tried "fiddling around" with forces. in fact, by "fiddling around" with forces, you can make video games, build suspension bridges, create Western Civilisation, etc.

so what you want is a retro-rocket that slows you to a stop just in time.

add a line of code that checks you are below a certain height. once you are below that certain height, kick in your retro rocket.

(obviously, if you also throw the object "up, then it comes down" you need to check that you are on the downward leg ... don't accidentally apply the retro rocket force when you first throw the object upwards. if you are unable to "check if velocity is downwards" you need to step back, learn the basics, and maybe ask questions about that issue)

so you check if you are heading downwards and below your "kick-in height"

at that point simply ..........apply a force upwards. remarkably, it's that easy.

using high school arithmetic, you can figure out what the force in Newtons should be. But interestingly, you can simply guess any value, and in a few tries you can get to the correct value.

simply apply the same force throughout the period where you're below the kick-in line

you're done

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ZenithCode · Oct 01, 2012 at 01:21 PM

The question you should ask yourself is, What behaviour do I expect if something comes in the middle of the trajectory? If nothing, then use iTween, otherwise use physics.

I would suggest you look at iTween examples here, http://itween.pixelplacement.com/examples.php

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

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

12 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

Related Questions

Custom Easing Types using Curves for Motion? 3 Answers

Bezier curve that update in real time. 1 Answer

How to display a bezier curve between transforms in-game rather than in editor? 2 Answers

Easing .curves 2 Answers

Bomb Trajectory for a "Water Canon" (Maths) 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