How do I move towards position of another layer?

0 favourites
  • 5 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • I have a game where a player collects coins. Each time a coin is collected, particles spawn and I want those particles to move towards the energy meter in the top right. The only problem I have is that the energy meter is on the "UI" layer so it does not move with the camera that follows the player on the "Game" layer.

    I have tried moving the particles to the 'UI" layer, but then they never spawn at the proper location since the player is moving. I tried using custom movement and bullet behaviors, but I cannot get an accurate movement path since the coins are not always collected from the same position. Any advice?

  • Your not going to be able to accomplish it. At least not in the way your doing it. The problem is the spawned position(coordinates) is always going to be a different coordinates on the UI layer. It's basically a parallax issue. I've tried to make a work around for his but without luck. You can sometimes get close, but not exact. If you or some one else, do come up with a solution, I'll be interested in seeing it

  • The layer to canvas and canvas to layer expression may work to translate the particle to the hud layer at teh good coordinate, then you just have to move them.

  • There's an example here:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's an example here:

    This worked perfectly and was exactly what i wanted to do. Thanks!

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