Scrolling affects collision?


(I'll tell you what I want, what I really really want) #1

Hello again. Let me just say first, I’ve moved and I have no internet connection on my pc, so I’m on my phone. Problem: When the screen scrolls sideways platforms stay in position as they should, left behind so the player can go forward. The only problem is when player does go forward the position of the platform, or should I say, the invisible ghost of them stays where it was. Let me clarify by showing you a pic (sorry for the quality - phone).

And don’t laugh at my amateur artwork :smiley:

Hope you guys can help.


(Justin Wolf) #2

How are you controlling the screen scroll? Are you using FP.camera?


(I'll tell you what I want, what I really really want) #3

Just x instead of y. Got it from the topic: Camera assistance.

Edit: and that is, my player’s x, in it’s update function.


(Justin Wolf) #4

Hmmm. Are you using a grid for your level’s collisions? Curious that the Entity’s graphics are scrolling but not the Entity itself. Though, in order to help us help you, you’re gonna need access to the code itself and share it so we can see what’s up. When you get a chance, open FlashPunk’s debug interface (using the ~ key) while playing your game and screenshot it so I can see what your collision is looking like.


(I'll tell you what I want, what I really really want) #5

Oh my vajesus, this so easy, I had my player.scroll.x set to 0.

I’m sorry, this one can be deleted now. Many thanks tho, Justin!


(Justin Wolf) #6

That would do it! Glad you figured it out! :slight_smile: It’s best the thread is just closed instead of deleted so others that may have the same problem as you can figure it out a bit easier! One of the mods should lock it shortly.


(Jacob Albano) #7