I have an issue, here it is:
Closed this issue · 1 comments
Description
I did the player movement and I am issuing a physic problem.
When there is the physic of the room, the character works good but not collisions, when I disable the physic of the room the collision works but the character go all the way to the right without pressing anything. In the charaacter there are 3 events, one is for the collision, the other one is a Step event to make him walk and the Create event.
Steps To Reproduce
Here there are the codes:
Step:
move_x = 0;
move_y = 0;
// Controllo input per il movimento e cambio sprite
if (keyboard_check(vk_left)) {
move_x = -speed;
sprite_index = spr_mainmoodyl;
image_speed = 1;
}
if (keyboard_check(vk_right)) {
move_x = speed;
sprite_index = spr_mainmoodyr;
image_speed = 1;
}
if (keyboard_check(vk_up)) {
move_y = -speed;
sprite_index = spr_mainmoodyu;
image_speed = 1;
}
if (keyboard_check(vk_down)) {
move_y = speed;
sprite_index = spr_mainmoodyd;
image_speed = 1;
}
// Se nessun tasto è premuto, ferma l'animazione
if (move_x == 0 && move_y == 0) {
image_speed = 0;
image_index = 0;
}
// Aggiornamento posizione
x += move_x;
y += move_y;
Create:
// Evento Create
speed = 2;
move_x = 0;
move_y = 0;
Collision:
[nothing]
Which version of GameMaker are you reporting this issue for?
IDE v2024.6.2.162 Runtime v2024.6.1.208
Which operating system(s) are you seeing the problem on?
Windows 10.0.22631.0
Which platform(s) are you seeing the problem on?
Windows
This is not a bug with GameMaker itself, but one in your project, so I will close this issue now. For coding support, please visit the GameMaker Community forum and create a thread there, asking for advice.