My player throwing 5 knives to ground with different angles.
else if (throwType == "onGround")
{
float angle = 15f;
for (int i = 0; i < 5; i++)
{
Instantiate(kunai, attackPoint.position, transform.rotation * Quaternion.Euler(0f, 180f, angle));
angle += 10f;
}
}
I tryed this code but I want the distance between each of the stabbing points of all the blades to be equal on level ground. Here is the triangle example that I meant. What method or solution do I use?
point - attackPoint.Position
Vector3.down
.In general I would recommend staying away from angles when possible, and instead use methods like Quaternion.LookAt to create rotations from direction vectors. I find vectors much easier to reason about and visualize, but you will need at least some familiarity with vector algebra.