Example #1
I made this in construct 3 and if P1 line is active he is drugging, of P2 he is active and if both lines, than then both are drugging. (interesting)
Dist = distance(p1.x,p1.y,p2.x,p2.y)
Ang = angle(p1.x,p1.y,p2.x,p2.y)
P1: move max(0, dist-radius) at angle ang
Or
P2: move -max(0, dist-radius) at angle ang
Example #2
I can't find the way to add "velocityx" to P1 or P2 there is no such expression (or I can't find it?)
W1 = max(0,p1.velocityx*cos(ang+180)+p1.velocityY*sin(ang+180))
W2 = max(0,p2.velocityx*cos(ang)+p2.velocityY*sin(ang))
Example #3 same thing with "velocityx"
R0J0hound, wow thank you for your time explaining to me how that works. That much detailed information will help me understand how to handle it in future (I hope so)
I also checked both files:
#1 tetherObjects.capx works perfectly
#2 tetherObjects_noDragging.capx have a strange bug: when any of the players are moving at 45° angle (keys A+W, S+D, LeftArrow+UpArrow, or DownArrow+RightArrow sprite starts shaking in some degree to left and to the right