GameSalad

Actor collision bouncing through walls

I have an actor "eddy" - Working name... now this poor little fellow is having some issues with collision functions. Let me try and explain.

The game: basically, Eddy can only move around an invisible grid. Each grid segment is 39x39 pixels.
So I have his moving set to:

WHEN down is down
DO change attribute
self.position.y TO self.position.y +39

That's great... BUT
the collision with the border surrounding my scene... lets call it "border"...Eddy "BOUNCES" into the border and quickly flashes back to the pre-collision segment... SOMETIMES!!!!
Sometimes he walks straight through the border... and if I use a border for a wall in the playing area, say you go on the x axis... he will go around the grid segment with the wall in it changing both the X axis attribute and the Y axis attribute simultaneously, effectively moving "around the wall.

The border is made up of many copied prototypes of the "border" actor each sized 39x39

I have all actors bounce physics to 0
All except Eddy have movable set to false
Density of the border is set to 30000 (just in case)

Answers

Sign In or Register to comment.