Turn after colliding with an object
I'm trying to setup a rule where my actor turns 90 degrees clockwise and continues moving every time it collides with a wall. This is similar to the game Chu Chu rocket when the mouse always turns to the right when it hits a wall.
Any ideas? Thanks
Any ideas? Thanks
Best Answer
-
NovicaStudio Posts: 174
When it collides with a wall have a change attribute self.rotation to self.rotation+90.
Also, create a rule that if self.Rotation is greater than or equal to 360, change attribute self.rotation to 0. So every time it hits a wall it will change the direction. If you need additional please ask an I might be able to put together some sort of template.