[SOLVED] Player actor stuck on screen edge - no X movement


  • *
  • Posts: 89
Hi, I've just started to learn Stencyl and ran into two problems:

1. When I set my player Actor Type movement to 'Normal', during simulation the actor automatically moves to the left edge of the screen and doesn't react to pressing 'left' or 'right' buttons. It does react to 'up' and 'down' buttons though. If I change the Actor Type to 'Cannot Be Pushed', it reacts to all 4 direction buttons (but then collisions don't work).
I've searched the forum, crash course 2 and the stencylopedia but still at a loss.

2. The actor doesn't stay within screen boundaries even though I made it check coordinates.
Any suggestions, especially to the first one?  Thanks

« Last Edit: September 22, 2018, 07:02:32 am by dtishin »


  • Posts: 2262
Firstly, turn on debug drawing (run > enable debug drawing) so you can see your collision shapes, maybe that will provide a clue. It sounds like something might be pushing your actor.

Can you also draw the value of your 'X-speed' attribute (not the x-speed of your actor) to the screen so we can see what it's doing.

Using 'cannot be pushed' will cause collisions to not have a physical effect on your actor. There are methods to still prevent  your actor from moving through tiles even with 'cannot be pushed'

As for your second problem, maybe your movement behaviour is somehow overriding it?


  • *
  • Posts: 89
Thanks Jeffrey, I turned Debug Drawing on and saw a huge frame standing in front of my actor.
I clicked various view modes in the Scene editor and discovered a Terrain rectangle that was blocking the way. I've no idea how I put it there :) Deleting the terrain solved both issues!
Thanks again, Debug Drawing works miracles!