0 Favourites

anchor objects

  • Hey guys,

    I have a little problem with keeping objects on their place...

    I created an object for ground (like a pavement), on this "pavement" I put some figure (as a main character) and here comes the problem. When I launch it via CocoonJS in order to see how it looks, the figure is not standing on the pavement but it is a little bit above it (DEPENDING on a mobile device I tried in because of their resolutions) ..

    EXAMPLE:

    http://postimg.org/image/9znnb23tv/

    The ground object has the anchor behaviour so it always has to be placed at the bottom of a mobile device. The figure object does not have any behaviour.

  • You are probably going to give the character some behaviours in the future, right?

    To change it you could pin the player to the pavement, or set the player to pavement.y on start of layout, but this would probably give you issues later on when the player gets his behaviours.

    I use anchor behaviour only for hud/gui elements within a game, which is what it is meant for in my eyes.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You are probably going to give the character some behaviours in the future, right?

    To change it you could pin the player to the pavement, or set the player to pavement.y on start of layout, but this would probably give you issues later on when the player gets his behaviours.

    I use anchor behaviour only for hud/gui elements within a game, which is what it is meant for in my eyes.

    initially I didnt want to use the anchor beh. for the ground object but when it was without this behaviour it was always on different places like the figure object...

  • Try apply sames principal for this tutorial :

    https://www.scirra.com/tutorials/253/ho ... tform-game

    I usually use anchor behavior in building UI, where I do not use the parallax effect

    Hope this helps.

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