Actor Positions update on layers with scroll factor 0 but not collision bounds

Fool

  • Posts: 88
Actor Positions update on layers with scroll factor 0 but not collision bounds. To duplicate, start with any template
game that has movement controls.

0. Create an actor and a new map layer. On the new layer, set scroll factor to 0, and place an instance of the new actor in the upper
left corner
1. Start the game.
2. Move your character down
3. Assuming camera follow, attempt to move your character onto the empty spot where the blocking actor WOULD be if the camera had not moved and the layer the actor was on was not set to scroll factor 0.
4. The attempt to move into the 'empty' spot should fail.
Conclusion: Sprites and onClick events are updating location on scroll factor 0 layers, but not collision bounds of those same actors.

As a work around, just create a new collision group in the settings screen that doesn't collide with the player actor group, or any other group for that. If you need it to be dynamic, you can go into any actor, under the appearance tab, create an animation thats a clone of the actors regular animation, name it 'ui' or something, and then in the collision tab set its group to something like doodads or a custom group that doesn't collide with actors.
Then whenever you need to prevent something on a higher layer that scrolls, from colliding with anything below (in the wrong location no less!) just change to the 'ui' animation for the given actor.

« Last Edit: June 08, 2016, 04:01:02 pm by Fool »

Justin

  • *
  • Posts: 4716
This is by design. onClick was made to work later, but I guess that's forgivable if the actor is used as a HUD element or something. Actors with a physical body probably shouldn't be placed on layers with different scroll factors.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

Fool

  • Posts: 88
Ah, I see, that makes sense. It wasn't an issue for me in any case, just thought I'd post in case it was a bug that someone was dealing with. Theres always going to be someone who is working just outside the bounds of their tools, encountering some weird edge case.