Hello, please help with object spawning, i have a circle, outside the circle there is an object that rotates and follows the object inside the circle, the object should spawn on the opposite side in a straight line, i have depicted this in the picture, thanks for any help.

The other point is just the difference vector, but either negated or added in the opposite way.

If that’s not what you’re asking, how to report your problem productively in the Unity3D forums:

This is the bare minimum of information to report:

- what you want
- what you tried
- what you expected to happen
- what actually happened, log output, variable values, and especially any errors you see
- links to documentation you used to cross-check your work (CRITICAL!!!)

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly

I don’t quite understand how to use it, the point inside the circle is almost (Player) never in the center and that’s the problem. I know the coordinates of point A, I need to spawn point B. I could, knowing the radius, put a point?

Then a line will be drawn between point A and B and a projectile will fly from point A to point B

I apologize if I don’t convey my thoughts well, I don’t know English well.

```
step = 2 * Mathf.PI / count;
Vector2 spawnPos = center + RotateVector(radius, step * randomIndex);
Instantiate(scenePrefab, spawnPos, Quaternion.identity);
```

I just need point B to spawn in a straight line from point A with a radius I know

What you contemplate requires more known variables, such as the lengths of the line segments.

This really sounds like an XYProblem because you haven’t specified why there is so much missing data involved.

What are you actually trying to solve here?

Found the solution here, maybe it will be useful for someone

```
Vector2 direction = gameObject.transform.position - player.transform.position;
circleNormal = Vector2.Perpendicular(direction);
Instantiate(endPoint, ComputeB(center, circleNormal, gameObject.transform.position, direction), Quaternion.identity);
private Vector3 ComputeB( Vector3 circleCenter, Vector3 circleNormalDirection, Vector3 point, Vector3 direction )
{
float a = Vector3.SignedAngle( circleCenter - point, direction, circleNormalDirection );
float w = 0;
if ( a >= 0 ) w = 180 - 2 * a; // because w + a + a = 180;
else w = -( 180 + 2 * a );
Vector3 BO = Quaternion.AngleAxis(w, -circleNormalDirection) * (point - circleCenter);
return circleCenter + BO;
}
```