Animation, collision, image size

rlehmrlehm Member Posts: 320
edited November -1 in Working with GS (Mac)
im curious about something I noticed in epig dive. The puffer fish grows in size. Generally an animation is made up of images. The images in the animation share the size of the main image, or actors size.

How is it when the fish is smaller, the surrounding space, which fills when he swells up, doesn't collide?

Does he interpolate size with animation? I ask because I didn't think we could dictate collsion dimensions.

Comments

  • scribblstudiosscribblstudios Member Posts: 118
    I think it might actually be changing images and size rapidly, not using the animate behavior.
    Just a guess.
  • rlehmrlehm Member Posts: 320
    I hope GS improves what the user can assign for collision area. As it is now it's real sad.
  • DrGlickertDrGlickert Member Posts: 1,135
    rlehm,

    Interpolating the size of an actor will not effect collision size. Collision size will still be the size of the original actor.

    However, had he used a timer with a change attribute then the collision size would have grown as the character grows. However, to use a timer in this manner you have to actually use two timers (see below for code) and it can be processor heavy. So my guess is that he chose performance over "play-perfection" if you will.

    Timer: For 1 second, Run to completion
    Timer: Every .1 second
    Change attribute: self.width to self.width+1
    Change attribute: self.height to self.height+1

    Do you see where you'd need two timers and one being called every .1 seconds? If you have lots of puffer fishes with this on it then it'll be kind of processor heavy.

    Good luck to you!
Sign In or Register to comment.