Ok so I'm making a game/engine which is like 3/4 view using physics for collisions and i've put in jumping over and walking on top of obstacles right, but as soon as i have obstacles that have different 'heights' i run into problems.
So i have a familty called Terrain, and every object in the terrain family has a ZHeight variable which tells the game how high the object is and subsequently how high the player will have to jump to get over/on top of it.
The player also has a ZHeight variable that is obviously how high off the ground he is.
So i'm running this little loop:
(Don't worry about the subevent in there, it's not part of this context)
Looking at it you would think it should work fine, cause the objects in terrain have varying heights, a 'for each' should be the way to go. Yet, the collisions are not disabled, with the 'for each' loop there i can't jump over a single thing, so i take the 'for each' loop out, now i can jump over things but it treats them all as the same height. It's quite frustrating. I'll upload the exe so you can see what's going on
You'll have to ignore the sprite laying for now, i'm also having trouble ordering the layers by ZHeight THEN by Y coordinate
WSAD + mouse - move
Space - jump
E and Q - go in and out of slow-mo (soon to be upgraded to super speed once/if physics velocity is pixels per second) currently mostly used for helping find bugs.
Anyway, is this a bug with families and disabling physics collisions? or is there a better way to code this? I dunno, anyone got any ideas?