Linear Constraint - get location of second actor, relative to the first

Hello lovely people,

simple question here:

I have connected two actors with a constraint that is attaced to Actor1 and that makes Actor2 move relative to Actor1 in a linear motion. All good.

How do I get the relative position of Actor2 to Actor1 while it is moving?
In the UPhysicsConstraintComponent I can use: GetCurrentSwing1 () but there is not such a thing like GetCurrentPosition1Rel() or so…

aaaaany comments welcome!

Greez, Alex

Take away one from the other?

Actor2->GetActorLocation() - Actor1->GetActorLocation()

Thanks Dan,

and then use the length of the vector, yes that would work.

I just thought that the constraint has that “length” information already in positive and negative direction.

Thank you again!

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

Privacy & Terms