public void TalkWithShip(Ship ship, PartFixture fixture) { this.body = ship.body; // Vector2 pos = ship.transform.position; // Vector2 offset = Uhh.RotatedVector (fixture.transform.localPosition, ship.transform.rotation.eulerAngles.z); Vector2 pos = fixture.transform.position; Vector2 offset = Vector2.zero; Vector2 scale = Vector2.one * .7f; if (activated) { offset += LOOKDIR * .25f; } if (selected) { scale = Vector2.one; } POS = Vector2.Lerp(POS, pos + offset, .35f); ROT = Mathf.LerpAngle(ROT, fixture.transform.eulerAngles.z, .35f); SCALE = Vector2.Lerp(SCALE, scale, .35f); selected = false; }
public void TalkWithShip(Ship ship, PartFixture fixture) { this.ship = ship; this.fixture = fixture; Vector2 pos = fixture.transform.position; pos -= LOOKDIR * .5f; Vector2 offset = Vector2.zero; if (activated) { offset += LOOKDIR * .25f; } POS = Vector2.Lerp(POS, pos + offset, .35f); ROT = Mathf.LerpAngle(ROT, fixture.transform.eulerAngles.z, .35f); selected = false; }