Categories
Development Game Creation

Hinge joints chain movement (2D)

I have some problems with hinge joint chain movement calculations… Here is my algorithm for segments location/rotation adjustments after a previous segment update (C#): void AdjustLocation() { float halfWidth = size.Width / 2; // Translations Vector parentBack = PrevSegment.Center – (halfWidth * new Vector(Cos(PrevSegment.Rotation), Sin(PrevSegment.Rotation))); // Green on the pic Vector front = this.Center + […]