[Behavior] moveto

Post your completed addons to share with the community

Post » Tue Mar 05, 2013 4:38 pm

I'm using the Moveto behavior plugin a lot, made by rexrainbow, it works smooth like silk. Just once thing is not perfect: when collide with solid, I can only set it to stop in event. Is it possible to make it glide along the solid collision? similar as the default feature for 8-direction behavior.
B
14
S
2
G
1
Posts: 94
Reputation: 2,089

Post » Tue Mar 05, 2013 6:37 pm

I'm not completely sure what you're on about, but you should look into using Pathfinder in conjunction with Moveto.
B
11
S
5
G
3
Posts: 19
Reputation: 2,969

Post » Tue Mar 05, 2013 8:27 pm

[QUOTE=XGDragon] I'm not completely sure what you're on about, but you should look into using Pathfinder in conjunction with Moveto.[/QUOTE]

I mean when moveto object hit the solid object in a angle, can it slide along the solid object? I have the similar example capx attached:
https://dl.dropbox.com/u/1396615/bugImage/8DirectionCollisionIssue.capx



I don't want to use Pathfinder in this case since the gameplay/control experience is not I wanted.
B
14
S
2
G
1
Posts: 94
Reputation: 2,089

Post » Tue Mar 05, 2013 10:35 pm

Calculate the angle the colliding object is coming from and force its movement upwards/leftwards etc based on that information.
B
11
S
5
G
3
Posts: 19
Reputation: 2,969

Post » Wed Mar 06, 2013 3:13 am

@porky   @XGDragon

Try push out solid behavior
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Wed Mar 06, 2013 9:23 am

Thanks rex! the push out almost solve the problem! Actually I was using the 8-direction for colliding with solid object, but there seems a bug when slide alone solid: if the moving object and solid are both square, slide to right/up direction can be much faster than to left/down. Do you have any clue about this?
B
14
S
2
G
1
Posts: 94
Reputation: 2,089

Post » Wed Mar 06, 2013 9:35 am

@porky

Could you provide a capx? (Though I had not much time to check this situation.)
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Wed Mar 06, 2013 9:46 am

Yes, I made one by MoveTo and PushoutSolid behaviors
https://dl.dropbox.com/u/1396615/bugImage/PushOutSolidIssue.capx
B
14
S
2
G
1
Posts: 94
Reputation: 2,089

Post » Thu Mar 07, 2013 3:19 pm

@porky

Thanks, it seems push out solid behavior did not find a path all times.
It is better using path finding behavior, instead of (moveTo+push out solid) behavior, like @XGDragon said.rexrainbow2013-03-07 15:20:02
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Fri Mar 08, 2013 8:51 am

Thanks rex:) Unfortunately I can't use pathfinding in my case. but its not that big issue so I can live with it for now.
B
14
S
2
G
1
Posts: 94
Reputation: 2,089

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests