# (Re Post) Need help with same actors colliding.

Member Posts: 85
edited November -1
Ok, so in my game, the actor pushes around crates to get through the maze, so what i want to happen, is that if one crate collides with another, i dont want the player to be able to push them BOTH in the same direction at the same time.(what happens is, the player pushes the crate, and when the crate hits the other crate, they both move in the same direction.) is there a way to stop this form happening?

(applying drag just makes them shake crazily when the player isnt moving them around)

thanks

• Member Posts: 1,714
use different actors.... you could do this with rules, but it would be heavy logic.... And its just not necessary
• Member Posts: 85
chosenonestudios said:
use different actors.... you could do this with rules, but it would be heavy logic.... And its just not necessary

ive tried using different actors but im not sure what rules to put in, im kinda newish
• Member Posts: 1,400
I was thinking of having a "sensor" actor that checks the area in the direction you are trying to move your player to see if there is more than one block present. I do something very similar in the puzzle game I am working on and it works like a charm...
• Member Posts: 85
barkbark00 said:
I was thinking of having a "sensor" actor that checks the area in the direction you are trying to move your player to see if there is more than one block present. I do something very similar in the puzzle game I am working on and it works like a charm...

sorry, i dont quite understand :S
• Member Posts: 1,400
You would need to constrain your players x/y to a set of game attributes.

Then you would create a smaller invisible actor that would spend most of it's time would spend most of its time constrained to the player's x/y. However, when you try to move your player, it would first send signal to the "sensor" that it need to scout out the area that your player intends to move into, at least the width of two crates. The sensor would track how many crate actors it overlapped and if the number is < 2 it would report back to the player that its is OK to move in that direction.