Grid movement doesn't detect collisions

Post your own tutorials, guides and demos.

Post » Wed Mar 10, 2010 3:19 pm

You're going about things kind of backwards here anyway. If you want solid collisions with your NPC's then check for overlap at offset with a solid in the next gridspace before moving them, rather than trying to stop their movement after it's already begun.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Apr 24, 2010 8:42 pm

Just want to highlight something already said cuz I was getting frustrated a week ago with the same problem.

[quote:2jbnjf83]"in the next gridspace before moving them" by deadeye[/quote:2jbnjf83]

That next gridspace part is really important. I was sending the character a variable number of steps and he would still walk over the barrier because he didn't reach an overlap till after he was already walking. Took me an hour or more of fiddling to figure out what was wrong.
B
2
S
2
G
3
Posts: 114
Reputation: 1,553

Previous

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests