- Home /
Moving 2D Sprite Object in Curve path.
Hi everyone!
i am new on this Unity please help me on my problem...
my question is how can i perform my 2D object move is different position smoothly? what i mean is when i pressed letter "Q" it perform "Forward Jump" like this... illustrated on picture below
my question is not above playing animation.... im using rigidbody2D
Please help me... thanks a lot.
Answer by SHG · Jun 10, 2014 at 06:57 PM
Well, you could make an animation for the curved path and play it when the player presses Q. And in animation states you can have it linked to any state so you can do that whenever. Its not a perfect answer, because I don't quite know what you want exactly.
function Update () {
if (Input.GetKeyDown ("Q")){
animation.Play("CurvePath");
}
}
Thanks for the response sir... sorry if my question is not clear....
i try to make it clear.... when the player presses the Letter "Q" the 2D Sprite Object is perfor$$anonymous$$g like a "Forward Jump" not an animation.... just an object going forward jump like the picture above sir...
hope it cleared now...
thanks
Answer by siddharth3322 · Jun 11, 2014 at 05:05 PM
You can use iTween for this purpose or any other third party plugin for this purpose. So that you just don't have to do more labour work.
Answer by Golkar_Asghar · Oct 19, 2021 at 09:41 AM
this question is very old but for everyone that needs this.
you can use a rigid body and add force to your characters.
if you want to move to a specific position use this: https://www.youtube.com/watch?v=ddakS7BgHRI&t=371s
Your answer
Follow this Question
Related Questions
water slide mini game unity 2 Answers
A node in a childnode? 1 Answer
Strange Rigidbody Behavior 0 Answers
Authoritative Networking 2D Movement 0 Answers
Dynamic Path Generation for 2D 0 Answers