Author Topic: springPanel position calculator  (Read 2180 times)

sk1989

  • Guest
springPanel position calculator
« on: October 02, 2012, 11:41:17 PM »
Vector3 newpos = panel.transform.worldToLocalMatrix.MultiplyPoint3x4(this.transform.position);
SpringPanel.Begin(panel.gameObject,newpos,8.0f);


I want to set an offset to the newPos and springPanel to that position.

I tried doing newPos += new vector3(0,10,0);

this is isnt working, why?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: springPanel position calculator
« Reply #1 on: October 03, 2012, 12:55:52 AM »
SpringPanel works in local coordinates and accepts an offset value. Look at what UICenterOnChild does.