[Solved] How do i turn off the collision without turning off platfromer behavior

Im trying to disable an enemy object collision without turning off the platformer behavior so it keeps all its platforming abilites, but i couldn’t find a way to do it.

What do you mean by that? Standard collision? You can just ignore that instead of acting on it.

Or are you meaning something else? In which case, can you try explaining or describing it in more detail?

Yeah they can kinda just use stop using events that uses the hitbox of the enemy

I want to temporarily disable the collision of an enemy sprite with the platfromer behaviour
so it doesn’t collide to solid objects like the ground

i want to make the object go throught solid objects which is not caused by any events that i added

Try to unable the platform behavior of the ground instead, or change the platform type.

Disabling the platform behavior or Changing platform type of the ground also affect how the player interact with it :frowning:

What does the object represent? Do you want to ignore certain objects, instances? Is it all the time or only at certain times? How are you deciding which ones to ignore and when?

Are the objects using any other behaviors than platform?

You can ignore all collision by adding a boolean variable check before the collision conditions. When it’s true check then it checks for collisions, if it’s false don’t do anything. If you want it at an object level either use a different object that’s not being tested or use an object variable. If object boolean of enemy is true, check for collision… If object variable is false then it won’t check for the collision or do anything.

It all depends on what you’re doing. The more info the more specific the response.

1 Like

the object is an enemy sprite with a platformer behaviour
i want to disable its collision only on certain times like when they die but still keeps the platformer behaviour on. how exactly do i ignore its collision ? i couldn’t find any option to do it

Are you using the health behavior or a variable? Before the collision test check either the health behavior or the variable. Any of these would work or another condition.

Conditions work like filter. It picks the objects that match and unpicks the others.

try me: Drag the player (large sprite) the enemy only jumps when alive.

1 Like

Im not using the health behavior not a variable .
i want to goomba to bounce up and down after getting hit by a Fireball without colliding with solid objects such as the ground (the ground have a platform behavior)


basically i want the enemy (goomba) to fall throught the ground like this:
koopa-troopa-1up

You can still add a boolean and set it to true on collision. So, it only dies once. Then either use the jump or add an upwards force and then with something like wait add a pause and then disable the platform behavior and add a downward force. Make sure the objects have the destroy off screen behavior. This might not be the best way but it’s one way and I hope it will help you understand the concept.

You can play with it, maybe add a force for up instead of jump. just diable the platform first.and add a force either up or slightly toward what hit it.

try me

3 Likes

EDIT: the @Keith_1357 implementation works just fine. Go with it.

So, I’ll make a guess:

Your enemies have platformer character behavior and you use it to move them. Once they’re killed, you want them to bounce and then fall down trough all the screen using the platformer behavior controls to sequence the bounce and the fall down, BUT the platformer behavior itself prevents the enemies to go trough the platform objects.

I’m right?
In case I’m: as far as I know there isn’t a direct way to disable just that part of the platformer behavior, but you can easily simulate that movement tweening the properties of the enemy after disabling the behavior.

Here’s a video about how to use tweens in GD: https://youtu.be/vdYi8Miwv2E?si=FE8gze2ti0C0OoRj

1 Like

your implementation works great! ,Thanks for taking the time to help! I appreciate it

1 Like

Thank you for your help ,i appreciate it !