Always in centre of screen

0 favourites
  • 6 posts
From the Asset Store
This Girls Game allows young fashionistas to develop their taste and skills as a fashion designer.
  • I have been having a few issues with the positional audio. I want the listen point to be the centre of the screen at all times.

    I therefore want to have an object that will always be positioned in the centre of the screen, even when the layout scrolls far away. I have tried putting it on a layer that doesn't scroll (HUD), but that didn't work. I think the code takes the position from its X and Y position, which is still at the beginning of the layout.

    I then tried using the anchor behaviour (all four sides) on a normal layer, but that appeared to have the same result.

    I have tried to put the listen point on the object that does all the scrolling, but sometimes it moves off to the left or right side of the screen, meaning the audio is usually coming out as central, rather than left or right aligned.

    I just need the listen object to move around freely, but always be dead centre of the screen without the HUD or anchor, as they don't appear to be compatible.

  • The way I'm reading this is that you don't want positional audio at all?

    If you just use the play sound without specifying a position, won't it be at dead center?

  • LittleStain I don't want the sound to come from the centre, I want whatever object is doing the listening to be in the centre. Sometimes things may be colliding off screen, and I want to be able to hear where they are.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Strangely, if I have an object that is always trying to follow the anchored object, and have that as the listen object, it still doesn't work, even though its X and Y do appear to be changing.

    At the same time, if I position the same object all the way to one side, and I approach it, the sounds do get louder.

  • Oops, my bad! I had a system set up so that the listen point was designated before the object was created. Didn't think it would make a difference, but if an object is referenced and doesn't exist, it reverts to 0,0.

  • [forget this]Do you use the scroll to behaviour or manually set the scroll to? This sometimes makes a difference..[/forget]

    never mind.. glad you got it working..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)