i want my ball to move only at 45 or 135 degree angle if it hits slider. is this possible? when ball hits slider in my game, it moves most of the time straight.
ya i used expression editor. here is my attributes
When collide with paddle, change attribute- self.motion.linear velocity x to self.motion.linear velocity x +1*(self.position x-game.mouse.position x) ------ this is iphone game so i made buttons to move left or right. (I ALSO TRIED- CHANGE ATTRIBUTE TO (self.linear velocity.x)(self.maxspeed.))
When attribute-self.motion.linear velocity y > -15 self.motion.linear velocity y <-15 then, change attribute self.motion.linear velocity.y to random(70,120)*(1)^(random(1,2))
Comments
When ball overlaps or collides with slider, change attribute ball angle to (in expression editor) random(1,2)
In the ball,
Rule
when overlap or collide with slider, attribute ball angle = 1
move behavior: set the direction to 45
Rule
when overlap or collide with slider, attribute ball angle = 2
move behavior: set the direction to 135
When collide with paddle, change attribute- self.motion.linear velocity x to self.motion.linear velocity x +1*(self.position x-game.mouse.position x) ------ this is iphone game so i made buttons to move left or right. (I ALSO TRIED- CHANGE ATTRIBUTE TO (self.linear velocity.x)(self.maxspeed.))
When attribute-self.motion.linear velocity y > -15
self.motion.linear velocity y <-15 then, change attribute self.motion.linear velocity.y to random(70,120)*(1)^(random(1,2))