Need (Some) Help with SHMUP Movement (SOLVED)

Hello again.
Looks like I got stuck again.
I have been trying to replicate movement similar to what most present day mobile SHMUP have - You tap the screen, move your finger around, and the plane follows it. The moment you release your finger, the plane stops moving.
All this while, the plane is continuously scrolling w.r.to y-axis.
I have tried 3 days now to make this kind of system and failed 300 times.
Any guidance how this can be done?
Thanks in advance

I’m guessing that this is your difficulty right here. Generally it’s much easier to have the player (or rather, the camera) stay still and have the enemies and background move downward.

In that case, all you need to do is, while a touch is held, convert the touch pos to world pos and set the player to that position. If you want to limit the player’s speed, just get the offset between the touch pos and player pos, clamp it’s length to the max player speed, and add it to the player’s pos.

1 Like

Staying still, and moving will do the trick, but the problem here is that the game I am (trying to) work on, is actually a racing game, with elements of shmup(movement basically) , that’s why I couldnt adopt that method.
The other way seems tough, but it appeared as the only way, therefore I had to adopt it, but I couldn’t figure out a way to implement it.

2 Likes

Looks like you were righ. I tried a lot on my style and failed, but by using the other way, I was able to do it quite easily. Thanks a lot man

2 Likes