physical response bug

Game Editor comments and discussion.

physical response bug

Postby phyzix5761 » Thu Jan 05, 2012 11:15 am

I am making a pac-man clone game and I am setting up the walls. I am using physical response when pacman collides with the wall. This works great! Except when he hits the right side of the wall. He seems to stop moving for a second, as expected, but then he warps to the other side of the wall. All other sides work correctly but not the right side.

See if you guys can figure out what's wrong.

Keys to move are W A S D. The wall is set up as a filled region actor.
Attachments
Pacman.zip
(199.51 KiB) Downloaded 118 times
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score

Re: physical response bug

Postby SuperSonic » Thu Jan 05, 2012 6:34 pm

The problem is your animation. I've seen problems like this before. You can avoid it by using a filled region for your collision detector instead :wink:
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: physical response bug

Postby phyzix5761 » Thu Jan 05, 2012 10:35 pm

I am using a filled region. I have the problem either ways.
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score

Re: physical response bug

Postby skydereign » Thu Jan 05, 2012 10:45 pm

No, you are using filled regions for the walls, not the player's collision detection. You need to use a filled region to act as the player's collision. If you make a square filled region around the hero actor, and have the hero parented to it, then the collisions will be what you want. Bearing in mind you have to move the filled region around instead of the hero actor.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: physical response bug

Postby phyzix5761 » Fri Jan 06, 2012 2:26 am

Thank you guys. That worked!
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest