4
\$\begingroup\$

Given a 2D Sprite (I'm using NGUI if it matters), what is the simplest way to move it to another position using a curve that resembles a jump?

enter image description here

When I used cocos2d, there was an action called JumpTo which basically tweened the sprite to a particular position. It had parameters for curve height and speed and such.

How can I achieve this in Unity? I have the DOTween plugin if it helps (although I don't think it does this).

I don't have a predefined path for the sprite to follow either. I only want it to behave like cocos2d.

\$\endgroup\$
0

1 Answer 1

7
\$\begingroup\$
  1. Go to the DOTween documentation
  2. Scroll down to the Move section.
  3. Click on DOJump to expand that explanation.

enter image description here

enter image description here

Is that what you're looking for?

\$\endgroup\$
3
  • \$\begingroup\$ Ah, my DOTween was outdated and didn't have those methods. \$\endgroup\$ Commented Jun 12, 2015 at 22:11
  • \$\begingroup\$ this is amazing .... \$\endgroup\$ Commented Apr 21, 2019 at 13:57
  • \$\begingroup\$ also, you can reverse the curve of the jump by negative jump power \$\endgroup\$ Commented May 27, 2022 at 13:53

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.