Hi, I am having problems with sine behavior and object colliding. The object is not bouncing off an object upon collision but sliding down it because of the sine behavior.
I thought of an alternative but I'm having problems implementing it in code:
On collision with object A
......If not colliding with floor B
............disable sine
............wait 1 second
............enable sine
......Else
............disable sine
............do not enable sine after 1 second
Basically if the box with sine behavior collides with object A, in order to override the sine behavior I am turning it off for 1 second and then turning it back on.
But I'm having a problem, because when the object falls on the ground I want the sine behavior to stop, which works until the box hits object A then hits the floor straight after. This causes the sine to stop upon hitting object A, but then when it hits the floor it is already stopped, but after 1 second it turns on again.
I'm not sure how to cancel the action of turning it on after 1 second after it hits the floor.
Thanks for you help.
Cheers.