Im having an Issue with Collision clipping

Hey Everyone, I am having an issue im my game, I have a “dimension” so to speak that is supposed to resemble one of those classic ice puzzle games you saw in rpg maker, Now I have the movement set up, it moves the character and prevents them from moving when they are still in motion. My issue now though is that if the character collides with the IceColliders object and I press the arrow key in the direction of the object I just hit, it walks through the collider. I have checked whether its the sprite masks but the sprite masks are set to stay the same for all frames. at this point im pulling my hair out… please help me

Hey sorry about the late reply!

Have you tried removing the Trigger Once from the collision event?

Im fairly certain thats the issue… because you collide, the events get triggered, but if you try to move and are still in collision, then the events wont trigger again, so the seperate objects wont work.

Try that and let me know :slight_smile:

Hey, I tried that but when I remove the “TriggerOnceWhileTrue” the character just completely stops moving once it hits the collider. This video shows the problem.

It’s a combination of the trigger once and setting deceleration to zero. It’s like saying set Y to Y - 0.

You need a positive number for deceleration greater than 0 to be able to stop. The larger the value the faster the deceleration.

As stated. The trigger once triggers on the initial collision but since it can’t slow down because it’s subtracting 0, it keeps moving and the separate object only happens once.

Tips. Separate objects doesn’t need any conditions. It does it’s own collision test. Using a collision condition makes the collision test happen twice.

Conditions all have to be true unless inside an Or condition so the and conditions aren’t needed. You can also put the actions on the same event as the conditions since your sub events don’t have any conditions.

It you’re trying to keep the player moving after the key is release then it probably would be better to do it through a variable(s) using simulate key when a variable is a certain value or skip the top down behavior and add a permanent force using a stop action first to prevent adding additional forces. Also, a trigger once.

1 Like

You’re creating a sort of manual separate objects by applying an instant negative force towards an object which is basically a force away from an object. You’re giving it a force directly so it’s not using the behavior’s deceleration value. IDK if it’s going to interfere with the behavior. It’s best to use one method of force at a time or they might each add a force which might cancel the other out. It’s like trying to paddle a boat that has a motor. The motor will probably win.

1 Like

You are absolutely right, and I think its messed with my other areas, I was looking at this Idea you gave me…

and I am trying to wrap my head around using the stop action before the player movement like so …

, it moves the character perfectly but the issue is that you can still change movement directions… I am sure I place the Stop action in the wrong place… could you help me please?

How about if on the first line you add a boolean variable condition like CanMove is true with a default value of true. Set it to false when one of the keys is pressed and then set it to true again when the player collides with an iceCollider.

I’ve always liked this type of puzzle. So, I played with the concept.

The player has 2 variables. The default values are important

Once I understood what you were making, I decided to try using force by direction with a variable so it uses the last key that is checked. That prevents diagonal movement and simplifies the events. I named the animation to match the angle, 0 is right, 90 is down, 180 is left, 270 is up.

Very important. For the collision test, set ignore objects that are touching to true. Or it will always trigger it when the player is next to a wall.

I also place stetched IceColliders along the edges to keep the player on the board and let them move again. You could use a group object or hide the border objects.

My test scene,

Hey I tried it, It unfortunately didnt work. I think it may be a conflict issue, as you see I am making multiple different rooms with different control schemes as such I am using the “Ignore Default Controls” function for each room. I am not sure why this is causing issues but I am going to share the images.



This would prevent the actions form happening more than once.

You can move that to it’s own event with other conditions if needed.

I dont suppose you could clarify for me? I am not sure how I would do that, would you accept a google meet call? Ill keep the call going for half an hour if you havent got a problem with it… (

If you don’t need the default controls just disable them once before the level or puzzle starts. Anywhere in the events as long as it’s not a condition for that group of events. For my test project, I didn’t add the top down behavior. I don’t know your overall concept but if you need the behavior then disable/reenable as needed

You could also use the same events and add a boolean variable nameds InvertControls. I uses an object variable. You just need to add the the variable and the highlighted event. And then at some point make it true or false.

The issue is that I do need the Top Down Controls, I have curse items that affect the players acceleration and deceleration, and I am probably going to add more… this is why I have the problem

1 Like

If this variable is false it’s setting it to true. Is there another event that has if true then set to false. Maybe that’s the issue. I don’t know the entire project. Maybe this needs a trigger once without changing the variable afterwards. IDK where you’re deciding if the controls need to be disabled. You could add an object variable to the ice surface, with a trigger once, If ice object variable disableControls is true then enable and if false then disable or vice versa depending on the phrasing. Then the ice object could decide. Either way it only needs to trigger once.