Spawners, Grouping And Heirarchy

Discussion in 'How Can I...?' started by david gianotti, Sep 12, 2017.

  1. david gianotti

    david gianotti Boxer

    Joined:
    Jan 18, 2017
    Messages:
    9
    Likes Received:
    5
    I've been developing a game for the last few months and have one small challenge.
    In this screenshot I have a red enemy that has a green spawner object grouped to it.

    [​IMG]

    Even though the green spawner is placed on a layer below the red enemy, once grouped to the red enemy the spawner overlays itself over the top of the red enemy.

    Is there a way to get this to work correctly? I just want the green objects to spawn from behind the red enemy.

    Thanks!
     
  2. Innovativeideas

    Innovativeideas Boxer

    Joined:
    Jun 6, 2017
    Messages:
    29
    Likes Received:
    15
    Hi there love the graphics of your game they are awesome.
    R the green objects active enemy or just decoration.
    If for effects u could them as trails in and connect them to the enemy so tht they stay in th'e background.
    and if they are active then also attach them to the enemy behind and hopefully the spawners will remain at the back. I hope my answer helps. Thumbs up for awesome work.
     
  3. david gianotti

    david gianotti Boxer

    Joined:
    Jan 18, 2017
    Messages:
    9
    Likes Received:
    5
    Thanks for the compliments and thanks also for your reply!
    The green guys are enemies and the spawner object is placed on a layer below the red enemy and grouped to it which is all good.
    The actual spawned green enemies are being generated over the top of the red enemy nevertheless.

    I presume that spawned objects are generated at the top most level of the game heirarchy each time they are instanced so possibly no easy solution here.

    Cheers!
     
  4. Mr Goodcat

    Mr Goodcat Boxer

    Joined:
    Jun 10, 2017
    Messages:
    98
    Likes Received:
    28
    Hi, having a similar problem. Did you manage to resolve?
     
  5. david gianotti

    david gianotti Boxer

    Joined:
    Jan 18, 2017
    Messages:
    9
    Likes Received:
    5
    Hi, sorry for the delay in getting back to you but have been under the hammer with deadlines. We didn't so much as solve it but had a simple hack that might suit your purposes. We simply duplicated the parent item into its own layer above the parent and child spawner and gave it the same vector and speed settings as the parent item so that it was always covering the parent and spawner. It may be possible to set the parent to have 0 opacity as well but not sure if that makes the child spawner also transparent.
     
    Mr Goodcat likes this.
  6. Mr Goodcat

    Mr Goodcat Boxer

    Joined:
    Jun 10, 2017
    Messages:
    98
    Likes Received:
    28
    Thanks for getting back to me. Unfortunately this doesn’t work in this instance as the spawner is linked to the character and so always becomes top layer. Also yes, if you make the parent invisible, the child will also be invisible. Thanks anyway!
     

Share This Page