anchor objects

Get help using Construct 2

Post » Fri Mar 28, 2014 11:59 am

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.
B
14
S
4
Posts: 110
Reputation: 1,538

Post » Fri Mar 28, 2014 12:13 pm

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.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Mar 28, 2014 3:32 pm

LittleStain wrote: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...
B
14
S
4
Posts: 110
Reputation: 1,538

Post » Fri Mar 28, 2014 4:05 pm

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.
B
28
S
2
G
3
Posts: 20
Reputation: 3,535


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 41 guests