I would like if it is possible that every time I touch the black object, the conveyor belt changes direction.
I have only managed to go to a single direction, but I would like to change the direction when I touch the black object
You need to use variables. Have a boolean variable on your Conv object and do something like "if player taps on Conv -> toggle boolean variable".
Then you can say "if the variable is true and the player is touching Conv on the bottom, he moves player.x-1", but "if the variable is false and the lpayer is touching Conv on the bottom, he moves player.x+1".
What a disaster I tried but there is no way
Thanks for helping me
Develop games in your browser. Powerful, performant & highly capable.
statham Here's a fixed capx with direction change on touch:
https://dl.dropboxusercontent.com/u/163 ... ta_v2.capx
No problem, happy to help
Waltuo Someone knows because when it falls to the right it falls bad and when it falls towards the left side falls straight?
I want it to fall straight down without rotating my player
statham if you use physics behavior for your player, it's better to move the object by applying physics force to it instead of directly moving it (it can mess with the physics). Here's a new capx where the rotation is fixed and movement is made by applying force at angles 0 (right) and 180 (left) degrees instead.
https://dl.dropboxusercontent.com/u/163 ... ov_v2.capx
You can play with the physics elasticity and friction settings on objects if you don't want the player to bounce when hitting surfaces etc.
If you don't really need physics and want the player to drop straight down instead of flying to left/right, you could also just use a platform behavior for the player (with default controls disabled) instead:
https://dl.dropboxusercontent.com/u/163 ... tform.capx