Hi
I assume the question is fairly simple but I can’t put all the information available to a working code =\
I have a circle that is moving between two walls. I need it to change it’s direction (just circle.xScale = -1) when it hit’s a wall.
I tried smth like that but doesn’t work =\ - changes the direction without any collisions.
local function onLocalCollisionone( self, event )
self.xScale = -1
end
circle.collision = onLocalCollisionone
circle:addEventListener( “collision”, circle )
thanks [import]uid: 40662 topic_id: 9554 reply_id: 309554[/import]