Actor Stay On Horizontal Moving Platform
Hi All,
Just a quick one (probably easy fix).
I have a platform/lift which moves horizontal back and forth. My actor can step on it, but when the lift moves the actor doesn't stay on.
Any ideas how I get him to stay on the lift when it moves?
Cheers,
Just a quick one (probably easy fix).
I have a platform/lift which moves horizontal back and forth. My actor can step on it, but when the lift moves the actor doesn't stay on.
Any ideas how I get him to stay on the lift when it moves?
Cheers,
Comments
make a rule in the player when actor collides with platform change stickx to self postion x, change stick y to self postiion y, and change stickon to 1
make another rule in the player when attriube stickon=1
constrain self position x to stickx
and constrain self positiony to stick y
then whatever rule you have to move the player, change attribute stickon to 0 whne a move happens to cancel the stick.
for a move example say you have a attribute movelft and have a rule in a button when touch is pressed change moveleft to 1 and when touch is release change move left to 0, put another change attribute behavior in the when touch is pressed rule and change stickon to 0
cheers
Thanks,