Layers and collision

rustbucketrustbucket Member Posts: 19
edited November -1 in Working with GS (Mac)
Hi folks, I'm trying to do the following: Two actors, one placed at a higher "z index" or layer than the other. The bottom actor has a rule to kill the player on contact. I assumed (incorrectly it seems) that if the player was on top of the actor without the kill rule that he would be safe from any collision detection but an actor below, but that rule is firing anyway. Does this mean that GS uses layers for display but not for collision? In other words for collision detection everything is one layer?

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    for development and for play you would use layers... affects visibility of actors
    HUD layer in front layer that is non-scrolling will stay on screen throughout scene
    while a background image that is scrolling will scroll with camera back and forth in the scene.

    but all action with/between all actors is active no matter the layer... and all layers react to mouse/touch.

    I keep screaming for a Z coordinate so things I want out front will be out front... I have managed to put things on different layers so smaller actors are visible above larger ones (especially needed when user drags them) ...

    someday... please Z so when touch is pressed changeAttribute self.Position.Z +10

    MH
  • rustbucketrustbucket Member Posts: 19
    Bummer, I was afraid that might be the answer. Thanks for confirming MotherHood.

    My specific issue is I'm creating a moving platform seen from above (its a ball rolling game) where if the player is not on top of it he dies. I suppose I could set up a second timer and have the kill actor(s) appear when the platform is not in a place where the player can roll on top. Slightly awkward but it should work. It's times like this when I want to gripe about the lack of features in GS and then I remember how much you do get to work with and I feel bad, like complaining about a free Ferrari because no one bothered to gold plate it.
  • FogelbergFogelberg Member Posts: 103
    rustbucket said:Does this mean that GS uses layers for display but not for collision? In other words for collision detection everything is one layer?
    I have managed to get collision between objects on different layers but it's really buggy and not very reliable. I think atm you must have all the actors colliding with each other on the same layer, and use the other layers for HUD, background grahics/parallax etc.
Sign In or Register to comment.