Recycling Problem!

iPwnApplicationsiPwnApplications Member Posts: 33
edited February 2012 in Working with GS (Mac)
Hey forum,
I am experimenting with a game similar to angry birds. Like in angry birds, when the character that is thrown stops, they disappear. However, I have my character respawn at the beginning.
To do this, I decided to recycle that actor. However, when it recycled back to the beginning, it begins to slowly drift downward. Why?
Thanks in advance,
iPwn

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    edited February 2012
    @iPwnApplications ... I'd imagine the actor that you move back to the beginning may have some left over physics effecting it from when it was thrown. You may need to set its self.motion.linearvelocity x and Y to zero with a change attribute when it is moved back. Also the self.motion.angular.velocity to zero and it self.rotation to zero. That should reset it it motionless with no rotation and at the starting rototational position.
  • iPwnApplicationsiPwnApplications Member Posts: 33
    hmm...tried it, and for some reason, it still drifts downward
  • iPwnApplicationsiPwnApplications Member Posts: 33
    bump?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    when it resets back, try constraing its x and y position to its initial postion, or try constrain its motion linear x and y to 0, or both. whatever works
  • iPwnApplicationsiPwnApplications Member Posts: 33
    for some reason, the way I have it set up is weird... but using your two comments combined fixed it for me! thanks!
Sign In or Register to comment.