I used the code below to ensure the object won't move outside of the screen.
if (getProperty("/object", _x)<21)>
setProperty("/object", _x, 21);
}
if (getProperty("/object", _x)>155) {
setProperty("/object", _x, 155);
}
if (getProperty("/object", _y)<28)>
setProperty("/object", _y, 28);
}
if (getProperty("/object", _y)>180) {
setProperty("/object", _y, 180);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment