change size and/or interpolate hight-width and collisions
Sparkyidr
Member Posts: 2,033
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.
(
is there any other way to do it, other than contstraining a separate actor to the collectable's x/y?
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.
(
is there any other way to do it, other than contstraining a separate actor to the collectable's x/y?
Comments
.9 fix I've not seen mentioned - Interpolate
collisions are possible with interpolation.
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 (
so it's not that
Might be a long shot but try unckecking movable.
Darren.
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?????
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
??
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. )
again...not sure if that's a bug or if that's expected behaviour.
Any Chefs shed any light on it?
But does anyone know if this is actually a bug, or whether it's expected behaviour from the interpolate behaviour.