1 decade ago by TommyBs
Hi,
I'm trying to implement some collision logic in my game, where I have obstacle entities (that have a fixed position) that stop the player entity but I want to allow another enemy entity (subclassed from obstacle but can move) to "Jump" over it. How would I go about this? I obviously can't set the obstacle to "passive" collision as this will mean the player can pass through as well. My player is currently set to LITE.
Forgot to mention this is a "top down" game, so by "jump" my entity basically just needs to move over the other entity
I've also tried messing around with touches(other) but to no avail. In fact, just overriding this method causes collision to stop working for that entity entirely, even when calling this.parent(other) still
Any ideas?
I'm trying to implement some collision logic in my game, where I have obstacle entities (that have a fixed position) that stop the player entity but I want to allow another enemy entity (subclassed from obstacle but can move) to "Jump" over it. How would I go about this? I obviously can't set the obstacle to "passive" collision as this will mean the player can pass through as well. My player is currently set to LITE.
Forgot to mention this is a "top down" game, so by "jump" my entity basically just needs to move over the other entity
I've also tried messing around with touches(other) but to no avail. In fact, just overriding this method causes collision to stop working for that entity entirely, even when calling this.parent(other) still
Any ideas?