Reputation: 181
I am trying to create kinematicBody that can move through other collision boxes of certain instances. Then once the user pushes a certain input, I want to look at all collisions and handle them a certain way. I have already create everything to handle collisions when the player moves into them, but I want the player to be able to stand above the item, then check to see if moving Vector2(0,0) would collide with any objects on the floor.
Perhaps this is not the best approach, if there are better suggestions of how to handle a kinematicBody2D object colliding with other objects and being able to walk over them, I'd love to hear.
Upvotes: 2
Views: 3061
Reputation: 400
I think you are looking for collision layers. Here is a short but very good explanation.
In your case you simply change the collision mask of your kinematic body depending on the button that is pressed in order to check whether or not your player collides with the object.
Upvotes: 2