Trajectory line with springjoint

I am trying to put in a trajectory line so the player would know where the ball is going to land. All resources I found are calculating with a force applied to the rigidbody.

Does anyone has an Idea how to calculate a trajectory line with springjoints?

Hey @Smarty . I don’t know if this is exactly what you were looking for, but I posted a similar solution for projectiles that do not use force (you have a start point and an endpoint) Projectile Parabola Motion and Rotation (Arrows fly on an arc)

1 Like

The only thing I can think of is to make a rough calculation of the “force” that is equivalent to the release with a springjoint…
This will likely require some trial and error…
The inputs will be the distance from the springjoint to the pivot, and the Vector from the springjoint to the pivot…
Somehow this will need to get converted to a force for the calculations. The greater the distance, the greater the force.

1 Like

Hey, thank you so much for your effort.

It seems much more complex than I thought it would be. I just came up with the idea to instantiate a second ball and let it launch, but it did not behave like I intended it. :slight_smile:

So for now I would rather find another mechanic to launch the ball, if I really want the trajectory line. But now I would rather focus on some features and skip this one.

I can only imagine.

1 Like

Maybe you can check this out - its on sale - Projectile Toolkit - Targeting and Trajectory Prediction | Physics | Unity Asset Store

It seems to do exactly what you described

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms