12-15-2015, 02:39 AM
(This post was last modified: 01-08-2016, 12:08 AM by Trainzland.)

everyone,

I have 2 problems to calculate a straight fixed distance between 2 points on a spline.

1)

Point A (Spline Controller) is moving.

Point B (Spline Controller) should be recalculated by a fixed straight distance (or radius) to Point A.

[img][/img]

________________________________________________________________________________________

2) Another Points A and B.

But Point A owns now a world position.

The Green Points are the result of (1)

[img][/img]

Would someone so kind and provide me with some lines of code how to. I'm not able to deal with vec math.

Thanks and kind regards,

Roger

I have 2 problems to calculate a straight fixed distance between 2 points on a spline.

1)

Point A (Spline Controller) is moving.

Point B (Spline Controller) should be recalculated by a fixed straight distance (or radius) to Point A.

[img][/img]

Code:

`public SplineController pA;`

public SplineController pB;

public float distance = 30;

2) Another Points A and B.

But Point A owns now a world position.

The Green Points are the result of (1)

[img][/img]

Code:

`public Transform pA;`

public SplineController pB;

public float distance = 20;

Would someone so kind and provide me with some lines of code how to. I'm not able to deal with vec math.

Thanks and kind regards,

Roger

(Henry Ford) Each hour more of searching is each hour less of your live time.