Skip to main content
added 16 characters in body
Source Link
Boneco Sinforoso
  • 681
  • 1
  • 20
  • 47

I had a problem with detecting my character's collision with the enemy being detected in 2 ways:

  • side by side
  • when it (character) jumps into the enemy's head.

I imagine it to be basic, so I figured this question would be not only on the site but also in countless other places.

I researched this site and found related things, but not exactly what I would like:

Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)

Handling exact collisions on character controller and/or other objects in unity? (eg. head shot, chest , leg,etc)

But because of this video I got it:

https://www.youtube.com/watch?v=9LbutnLIj84


The game I'm doing is platform, but instead of the character move, it's the platform that moves.

Step Event (obj_Plataform) - Step Event:

if jump==false{
    if !place_meeting(x,y+1,obj_Player){
        vspeed=-5;
    }else{
        vspeed=0;
    }
}else{
    if contJump<20{
        contJump+=1;
    }else{
        jump=false;
        contJump=0;
    }
}

This is a code that causes the platform to go up when it is not in contact with the player.

And it has a condition for the platform jump (it goes down and the jump variable becomes true, and after the counter reaches a certain value the jump variable becomes false).

My problem is that the character can not get into the platform by colliding on the side with it (The character is the white cube):

enter image description here

I thought about using place_meeting in relation to the x-axis, but the whole platform is just an object (error), because I do not know if it would be possible to move some of dozens of tiles at the same time in the correct way.

Plataform:

enter image description here

I also tried something related in a collision event among those involved, including using the character's x, but nothing worked.

I thought a condition to prevent the platform from walking left while it is colliding with the character.

Keyboardobj_Plataform - Keyboard Event (left arrow):

x-=10;

Above the current code to move the platform to the left.

I had a problem with detecting my character's collision with the enemy being detected in 2 ways:

  • side by side
  • when it (character) jumps into the enemy's head.

I imagine it to be basic, so I figured this question would be not only on the site but also in countless other places.

I researched this site and found related things, but not exactly what I would like:

Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)

Handling exact collisions on character controller and/or other objects in unity? (eg. head shot, chest , leg,etc)

But because of this video I got it:

https://www.youtube.com/watch?v=9LbutnLIj84


The game I'm doing is platform, but instead of the character move, it's the platform that moves.

Step Event (obj_Plataform):

if jump==false{
    if !place_meeting(x,y+1,obj_Player){
        vspeed=-5;
    }else{
        vspeed=0;
    }
}else{
    if contJump<20{
        contJump+=1;
    }else{
        jump=false;
        contJump=0;
    }
}

This is a code that causes the platform to go up when it is not in contact with the player.

And it has a condition for the platform jump (it goes down and the jump variable becomes true, and after the counter reaches a certain value the jump variable becomes false).

My problem is that the character can not get into the platform by colliding on the side with it (The character is the white cube):

enter image description here

I thought about using place_meeting in relation to the x-axis, but the whole platform is just an object (error), because I do not know if it would be possible to move some of dozens of tiles at the same time in the correct way.

Plataform:

enter image description here

I also tried something related in a collision event among those involved, including using the character's x, but nothing worked.

I thought a condition to prevent the platform from walking left while it is colliding with the character.

Keyboard Event (left arrow):

x-=10;

Above the current code to move the platform to the left.

I had a problem with detecting my character's collision with the enemy being detected in 2 ways:

  • side by side
  • when it (character) jumps into the enemy's head.

I imagine it to be basic, so I figured this question would be not only on the site but also in countless other places.

I researched this site and found related things, but not exactly what I would like:

Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)

Handling exact collisions on character controller and/or other objects in unity? (eg. head shot, chest , leg,etc)

But because of this video I got it:

https://www.youtube.com/watch?v=9LbutnLIj84


The game I'm doing is platform, but instead of the character move, it's the platform that moves.

obj_Plataform - Step Event:

if jump==false{
    if !place_meeting(x,y+1,obj_Player){
        vspeed=-5;
    }else{
        vspeed=0;
    }
}else{
    if contJump<20{
        contJump+=1;
    }else{
        jump=false;
        contJump=0;
    }
}

This is a code that causes the platform to go up when it is not in contact with the player.

And it has a condition for the platform jump (it goes down and the jump variable becomes true, and after the counter reaches a certain value the jump variable becomes false).

My problem is that the character can not get into the platform by colliding on the side with it (The character is the white cube):

enter image description here

I thought about using place_meeting in relation to the x-axis, but the whole platform is just an object (error), because I do not know if it would be possible to move some of dozens of tiles at the same time in the correct way.

Plataform:

enter image description here

I also tried something related in a collision event among those involved, including using the character's x, but nothing worked.

I thought a condition to prevent the platform from walking left while it is colliding with the character.

obj_Plataform - Keyboard Event (left arrow):

x-=10;

Above the current code to move the platform to the left.

deleted 241 characters in body
Source Link
Boneco Sinforoso
  • 681
  • 1
  • 20
  • 47

From the beginning, I sincerely apologize.

I had a problem with detecting my character's collision with the enemy being detected in 2 ways:

  • side by side
  • when it (character) jumps into the enemy's head.

I imagine it to be basic, so I figured this question would be not only on the site but also in countless other places.

I researched this site and found related things, but not exactly what I would like:

Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)

Handling exact collisions on character controller and/or other objects in unity? (eg. head shot, chest , leg,etc)

But because of this video I got it:

https://www.youtube.com/watch?v=9LbutnLIj84

The excuses are that I am participating in a game jam, and because I am nervous and stressed to deliver my game on time, I am unable to research better and have to appeal to the use of this site.


The game I'm doing is platform, but instead of the character move, it's the platform that moves.The game I'm doing is platform, but instead of the character move, it's the platform that moves.

Step Event (obj_Plataform):

if jump==false{
    if !place_meeting(x,y+1,obj_Player){
        vspeed=-5;
    }else{
        vspeed=0;
    }
}else{
    if contJump<20{
        contJump+=1;
    }else{
        jump=false;
        contJump=0;
    }
}

This is a code that causes the platform to go up when it is not in contact with the player.

And it has a condition for the platform jump (it goes down and the jump variable becomes true, and after the counter reaches a certain value the jump variable becomes false).

My problem is that the character can not get into the platform by colliding on the side with it (The character is the white cube):

enter image description here

I thought about using place_meeting in relation to the x-axis, but the whole platform is just an object (error), because I do not know if it would be possible to move some of dozens of tiles at the same time in the correct way.

Plataform:

enter image description here

I also tried something related in a collision event among those involved, including using the character's x, but nothing worked.

I thought a condition to prevent the platform from walking left while it is colliding with the character.

Keyboard Event (left arrow):

x-=10;

Above the current code to move the platform to the left.

From the beginning, I sincerely apologize.

I had a problem with detecting my character's collision with the enemy being detected in 2 ways:

  • side by side
  • when it (character) jumps into the enemy's head.

I imagine it to be basic, so I figured this question would be not only on the site but also in countless other places.

I researched this site and found related things, but not exactly what I would like:

Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)

Handling exact collisions on character controller and/or other objects in unity? (eg. head shot, chest , leg,etc)

But because of this video I got it:

https://www.youtube.com/watch?v=9LbutnLIj84

The excuses are that I am participating in a game jam, and because I am nervous and stressed to deliver my game on time, I am unable to research better and have to appeal to the use of this site.


The game I'm doing is platform, but instead of the character move, it's the platform that moves.

Step Event (obj_Plataform):

if jump==false{
    if !place_meeting(x,y+1,obj_Player){
        vspeed=-5;
    }else{
        vspeed=0;
    }
}else{
    if contJump<20{
        contJump+=1;
    }else{
        jump=false;
        contJump=0;
    }
}

This is a code that causes the platform to go up when it is not in contact with the player.

And it has a condition for the platform jump (it goes down and the jump variable becomes true, and after the counter reaches a certain value the jump variable becomes false).

My problem is that the character can not get into the platform by colliding on the side with it (The character is the white cube):

enter image description here

I thought about using place_meeting in relation to the x-axis, but the whole platform is just an object (error), because I do not know if it would be possible to move some of dozens of tiles at the same time in the correct way.

Plataform:

enter image description here

I also tried something related in a collision event among those involved, including using the character's x, but nothing worked.

I thought a condition to prevent the platform from walking left while it is colliding with the character.

Keyboard Event (left arrow):

x-=10;

Above the current code to move the platform to the left.

I had a problem with detecting my character's collision with the enemy being detected in 2 ways:

  • side by side
  • when it (character) jumps into the enemy's head.

I imagine it to be basic, so I figured this question would be not only on the site but also in countless other places.

I researched this site and found related things, but not exactly what I would like:

Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)

Handling exact collisions on character controller and/or other objects in unity? (eg. head shot, chest , leg,etc)

But because of this video I got it:

https://www.youtube.com/watch?v=9LbutnLIj84


The game I'm doing is platform, but instead of the character move, it's the platform that moves.

Step Event (obj_Plataform):

if jump==false{
    if !place_meeting(x,y+1,obj_Player){
        vspeed=-5;
    }else{
        vspeed=0;
    }
}else{
    if contJump<20{
        contJump+=1;
    }else{
        jump=false;
        contJump=0;
    }
}

This is a code that causes the platform to go up when it is not in contact with the player.

And it has a condition for the platform jump (it goes down and the jump variable becomes true, and after the counter reaches a certain value the jump variable becomes false).

My problem is that the character can not get into the platform by colliding on the side with it (The character is the white cube):

enter image description here

I thought about using place_meeting in relation to the x-axis, but the whole platform is just an object (error), because I do not know if it would be possible to move some of dozens of tiles at the same time in the correct way.

Plataform:

enter image description here

I also tried something related in a collision event among those involved, including using the character's x, but nothing worked.

I thought a condition to prevent the platform from walking left while it is colliding with the character.

Keyboard Event (left arrow):

x-=10;

Above the current code to move the platform to the left.

Source Link
Boneco Sinforoso
  • 681
  • 1
  • 20
  • 47

How to make character not enter the platform when colliding on the side with the platform?

From the beginning, I sincerely apologize.

I had a problem with detecting my character's collision with the enemy being detected in 2 ways:

  • side by side
  • when it (character) jumps into the enemy's head.

I imagine it to be basic, so I figured this question would be not only on the site but also in countless other places.

I researched this site and found related things, but not exactly what I would like:

Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)

Handling exact collisions on character controller and/or other objects in unity? (eg. head shot, chest , leg,etc)

But because of this video I got it:

https://www.youtube.com/watch?v=9LbutnLIj84

The excuses are that I am participating in a game jam, and because I am nervous and stressed to deliver my game on time, I am unable to research better and have to appeal to the use of this site.


The game I'm doing is platform, but instead of the character move, it's the platform that moves.

Step Event (obj_Plataform):

if jump==false{
    if !place_meeting(x,y+1,obj_Player){
        vspeed=-5;
    }else{
        vspeed=0;
    }
}else{
    if contJump<20{
        contJump+=1;
    }else{
        jump=false;
        contJump=0;
    }
}

This is a code that causes the platform to go up when it is not in contact with the player.

And it has a condition for the platform jump (it goes down and the jump variable becomes true, and after the counter reaches a certain value the jump variable becomes false).

My problem is that the character can not get into the platform by colliding on the side with it (The character is the white cube):

enter image description here

I thought about using place_meeting in relation to the x-axis, but the whole platform is just an object (error), because I do not know if it would be possible to move some of dozens of tiles at the same time in the correct way.

Plataform:

enter image description here

I also tried something related in a collision event among those involved, including using the character's x, but nothing worked.

I thought a condition to prevent the platform from walking left while it is colliding with the character.

Keyboard Event (left arrow):

x-=10;

Above the current code to move the platform to the left.