change size and/or interpolate hight-width and collisions

SparkyidrSparkyidr Member Posts: 2,033
edited November -1 in Working with GS (Mac)
I seem to remember that the change size behaviour doesn't expand the collision box as well as the graphics
But does interpolate also do the same?

I have a game where I want to collect somthing moving down the screen.
As it gets closer to the screen, I want to increase it's size. (to fake a psudo 3d kind of thing)

When I leave off the change size, it works fine.
With a change size behaviour in there, the collision does not register

So I tried with 2 interpolates (on width and hight) and the collision also doesn't register.

:o(

is there any other way to do it, other than contstraining a separate actor to the collectable's x/y?

Comments

  • JackBQuickJackBQuick Member Posts: 524
    I haven't used it yet but according to this post:

    .9 fix I've not seen mentioned - Interpolate

    collisions are possible with interpolation.
  • SparkyidrSparkyidr Member Posts: 2,033
    yeah. I remember reading that the other day. Which is why I'm bummed I can't get it to work.

    I have an actor moving down the screen from the top. when it gets to a certain y value, I am then interpolating it's x value slightly.

    When I collide with this it works fine

    If I then add 2 interpolate behaviours for the hight and width to simulate it getting closer to the screen, the collisions don't register any more.

    I wonder if it's some confusion between the interpolate for the x value, and the 2 size interpolations???

    hmmmmmmm

    ---

    edit.
    just removed the x value interpolate, and still no collision :o(

    so it's not that
  • UtopianGamesUtopianGames Member Posts: 5,692
    Strange....the interpolate size width still works on RW, we have a stretchy platform that grows outwards and it still works as in the character still runs across it.

    Might be a long shot but try unckecking movable.

    Darren.
  • SparkyidrSparkyidr Member Posts: 2,033
    I think it must be a speed thing.

    Just made a test scene with a "collectable" that doesn't move, and grows to be quite big quite slow....and it toaly works as you lot have it.

    In my actual game though, I'm wondering if, because they are moving down the screen pretty quick, and because the size change is relatively small(20x20-60x60), and pretty fast (0.6sec) that it doesn't update the collision box as quick as the graphics?????
  • SparkyidrSparkyidr Member Posts: 2,033
    have found the problem i think.

    in my test scene, the collision registers fine if I ...move into.... the thing I am collecting.
    If I move near it, and wait for it to grow into me to hit me, it doesn't register the collision...until I move.

    Going to try to move the "collect rules" (i.e. add 1 to an attribute) from the player actor, onto the collectable actors to see if that solves that issue.

    edit :
    no. Same result. The hit doesn't register until the player actor moves.

    not sure if thats a bug, or expected behaviour
    ??
  • SparkyidrSparkyidr Member Posts: 2,033
    a little more investigating....and I have figured out why....but not what to do about it. ;o)

    The new collision size doesn't come into play until the size interpolation has completed.

    I did this as a test.

    1.
    Set the size to grow from 20x20 - 200x200
    sat my "player" under it
    Set the collecable to move downwards once it hit 200x200

    let it run into my player.
    Collision works.

    2.
    Set the size to grow from 20x20 - 200x200
    sat my "player" under it
    Set it to move down when the size was around 60x60...so it's still growing by the time it hits my player

    The collision does not register

    a big MEH! from me. :o)

    again...not sure if that's a bug or if that's expected behaviour.
    Any Chefs shed any light on it?
  • SparkyidrSparkyidr Member Posts: 2,033
    sorry to bring up an old thread of my own.

    But does anyone know if this is actually a bug, or whether it's expected behaviour from the interpolate behaviour.
Sign In or Register to comment.