- Home /
Question by
Paricus · Mar 17, 2017 at 07:25 PM ·
particle systemprojectiletrajectoryprediction
Trajectory Prediction with Particle Systems
Hi. I've been looking for a way to accurately present the trajectory of a projectile. The maths makes enough sense but I've been struggling to find a good way present it visually.
https://youtu.be/XFKXfS21IHY?t=190
I found a video doing it perfectly, but I'm not too sure how they accomplished it. Could anybody share some insight. Thanks.
Comment
Answer by kt2ssh · Aug 30, 2021 at 05:37 AM
Particle settings :
Gravity modifier = 1
Shape - rotation x, y, z = -60 , 0 , 0
Trajectory prediction by finding the startSpeed :
particle gameObject :
transform.position = startposition;
var distance = Vector3.Distance(targetposition, startposition);
var v = Mathf.Sqrt(distance / (Mathf.Sin(2 * 60 * Mathf.Deg2Rad) / 9.8f));
var main = fireParticles.main;
main.startSpeed = v;
Your answer
Follow this Question
Related Questions
how to draw trajectory of rocket for faux gravity in unity???? 0 Answers
2D projectile trajectory prediction 2 Answers
Basic projectile trajectory with transform 1 Answer
Unity Messing up Basic Math? Projectile Trajectory Algorythm 1 Answer
How can i move Arrow realistic way according trajectory projectile ? 2 Answers