LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Bullet Hell Movement?

Root / Programming Questions / [.]

KevinTheDumbCatCreated:
Let me jump straight into it. Here's how I want the player to move: So the player is on the touchscreen and is constantly moving in the direction he is facing. If you tap the touchscreen, the player will turn to the touched point, as long as you hold it. If somebody could do that, then that would be awesome!

I don't know, if I understand you correctly: The character shoud permanent walking to the direction he looks.The character is fixed to a point (for example: centre) and the background is moving. The user touched, so the background will stop and only the character should begin to move to this touched point. What should happen, if the user removed touching before the point is arrived? Stops the charakter if it arrived the touched point? Or do you like more the character should only move to a point while the screen is touched and don't move without touching?

Ich glaube, ich hätte das ein bisschen besser erklären können. Also, jetzt nochmal: Der Spieler bewegt sich konstant in die Richtung, in die er schaut. Das Spiel ist auf nur einem Bildschirm (Das heißt, der Spieler bewegt sich und der Hintergrund nicht). Wenn du den Touchscreen berührst, dreht sich der Spieler, bis er auf den Punkt schaut, und da er sich konstant in die Richtung bewegt, in die er schaut, bewegt er sich logischerweise auf den Punkt zu. Selbst wenn du den Touchscreen loslässt, bewegt sich der Spieler weiter. Hoffe, dass die Erklärung nicht zu verwirrend ist!

Was ist mit der Begrenzung des Bildschirms ? Soll die Figur da umkehren, an der anderen Seite wieder heraus kommen, oder ... Bis auf die Sache mit der Bildschirm-begrenzung sollte das recht einfach gehen. P.S. : Annimierter Charakter oder einfach nur ein Bild, das verschoben wird? Englisch version:
Spoiler What about the limitation of the screen ? Should the figure turn around, come out at the other side, or ... . Except for the thing with the screen limit, it should be quite easy. P.S. : Annimated character or just a picture that is moved? Automatic translatet by https://www.deepl.com/de/translator

ooh I'll give it a try try to study the code I submit so you can understand it. KEY: DHP33Q3 Try to study it. Look at how I made the hand move with the sine and cosine of the direction it was moving. Check how I detected where it should point when you touch, with ATAN. Check all of the meaty stuff.

Good job @random_god. (I was thinking to much. lol)

Good job @random_god. (I was thinking to much. lol)
Thanks

I don't understand how it works but it's still really cool! Thanks a lot!

I don't understand how it works but it's still really cool! Thanks a lot!
your welcome.