Exact positioning with path-finding

Get help using Construct 2

Post » Thu Nov 24, 2016 12:21 am

So I can't seem to figure out how to make an object with path-finding to go to a specific point on the layout.

For example, I would want the object to go to x200 , y300, and depending on how close the object is to these coordinates, it would over-shoot or under-shoot the position...

So, do you know a way to make it arrive at the exact position?
ImageImageImageImage
B
30
S
9
G
7
Posts: 245
Reputation: 5,602

Post » Thu Nov 24, 2016 9:58 am

It should arrive at the position you've specified.
B
46
S
16
G
77
Posts: 2,159
Reputation: 45,833

Post » Thu Nov 24, 2016 10:50 am

plinkie wrote:It should arrive at the position you've specified.

Here's a .capx file showing what I mean: https://www.dropbox.com/s/9mwk4301i7cjn ... .capx?dl=0
ImageImageImageImage
B
30
S
9
G
7
Posts: 245
Reputation: 5,602

Post » Thu Nov 24, 2016 12:03 pm

It's just to do with the speed, acceleration and deceleration, those kind of options. If it takes a longer time to slow down it'll shoot past it or can start slowing too early. I'm not entirely sure what the perfect settings are to stop immediately but maybe somebody knows.

If you want to move to an exact location you could try the rexrainbow moveto plugin, which doesn't have the need for physics and speed settings on an object. It simply moves the sprite to an exact location.
B
46
S
16
G
77
Posts: 2,159
Reputation: 45,833

Post » Thu Nov 24, 2016 4:41 pm

plinkie wrote:It's just to do with the speed, acceleration and deceleration, those kind of options. If it takes a longer time to slow down it'll shoot past it or can start slowing too early. I'm not entirely sure what the perfect settings are to stop immediately but maybe somebody knows.

If you want to move to an exact location you could try the rexrainbow moveto plugin, which doesn't have the need for physics and speed settings on an object. It simply moves the sprite to an exact location.

Does it set the position of the object, or does it move it towards that position with a constant speed?
ImageImageImageImage
B
30
S
9
G
7
Posts: 245
Reputation: 5,602

Post » Thu Nov 24, 2016 5:47 pm

It moves towards the position at a constant speed and it is exact, probably what you are looking for. If you want to just teleport to a position you use set position.
B
46
S
16
G
77
Posts: 2,159
Reputation: 45,833

Post » Thu Nov 24, 2016 6:14 pm

plinkie wrote:It moves towards the position at a constant speed and it is exact, probably what you are looking for. If you want to just teleport to a position you use set position.

Great then, thank you!
ImageImageImageImage
B
30
S
9
G
7
Posts: 245
Reputation: 5,602


Return to How do I....?

Who is online

Users browsing this forum: MassimoF, Microbex and 21 guests