- Home /
shoot a projectile on a curved path ?
the result i want is similar to angry birds but from top view camera and no gravity would be included , or more like Knife Hit game except i want to shoot the projectile either straight , right curve or left curve .
Answer by tormentoarmagedoom · Feb 18, 2020 at 02:31 AM
Hello.
Ok, so you need the path thet the projectile will follow?
Then you can do a "trick". Generate a new object called something like "path definer". This object is not the projectile,it does not have mesh, but it moves the same as the projectile will. In this object, add only a Line Renderer: https://docs.unity3d.com/Manual/class-LineRenderer.html
So it will Draw the path that a projectile will follow.
Bye!
thank you , but , its doesn't solve it , as it provides fixed movement .
Ok, i see, I updated the answer, tell me if this is what you are saking for
this worked for me
Physics2D.gravity = new Vector2(Physics2D.gravity.y , 0); for now when i shoot the projectile on the right side , the projectile starts "dropping " to the left wich is what i want , now i whats left is when i shoot to the left , the projectile drops on the right as if the whole y axis is the center of gravity , and thanks by the way !
Your answer
![](https://koobas.hobune.stream/wayback/20220612223506im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to avoid speed change in bullets while moving? 1 Answer
Projectile move towards mouse cursor 3 Answers
Projectile Wont fire 2 Answers
Make multiple Projectiles move at the same Time... 0 Answers