The Daily Click ::. Forums ::. Klik Coding Help ::. Hit detection problem
 

Post Reply  Post Oekaki 
 

Posted By Message

Gurkan



Registered
  19/09/2010
Points
  1
19th September, 2010 at 23:04:14 -

I can't get hit detection to work with objects placed by the pathfinding object. I had it make a maze for me, and the player moves by grid movement. Like if the player presses Left, he moves X-16, Y0. And if he presses Right, he moves X+16, Y0.

I placed 4 hit detection boxes around him, 1 to the north, 1 to the south, 1 to the east and 1 to the west. Whenever 1 of these boxes are over an object the player is stopped from moving. I tested my setup and it works perfectly on everything except those darn maze walls.

When the pathfinding object places the walls it pastes them into the background as as obstacles. What can I do to get my hit detection to work?

 
n/a

Rick Shaw



Registered
  30/04/2008
Points
  158
25th September, 2010 at 03:04:24 -

Are the detector objects testing on "overlapping a backdrop"? Because you mentioned them stopping the player when they're overlapping an object... There's a difference.

There may be other possibilities. Are you using layers in your frame?

 
n/a
   

Post Reply



 



Advertisement

Worth A Click