Stacked actors getting squashed
Hey guys,
Working on a super quick prototype for a game I had a dream about, just to get it out of my head. ANYWAY - I've come across an issue whereby actors that are stacked on top of each other (with a fixed floor), seem to get squashed. The top actor in the stack has fake gravity using a downward acceleration, but none of the other actors in the stack do. The top actor 'jumps' up by changing linear y velocity, and the accelerate brings it back down.
It's about half a pixel per block, so not too noticeable, but it stacks up, so when there's a tower of 20 blocks, the difference is about 10 pixels.
It's not that the floor is moving down as it's not movable, and I've checked to see if it's y position changes at all and it doesn't.
Anyone run into this issue before, or can think what might be causing it?
Comments
@imjustmike have you tried increasing the density of the actors?
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
I have, but if I'm honest, I'm not 100% sure what I'm doing with it.
I currently have the top actor (with gravity) to be 2, and the other blocks to be 1. I've tried having the blocks below have greater density but it makes some other collisions stuff... janky...
Very nebulous
Density makes the actor more "solid", and a value of 1 or 2 is still quite low. What do you mean by janky exactly?
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
It's when things jank against each other.
Ah, I've never really used density so didn't know what values typically were. I'll play around with higher values.
By janky I mean things don't look as smooth and it applies physics where I don't really want it - which is why I typically don't use density. Things such as when a block lands on top of another block that is moving left to right, a lot of momentum is transfered which makes the falling block tilt a bit when it lands etc.
I'll keep playing, I'm sure I'll figure it out. Thanks for your help @Hopscotch