Is there a way in code to detect if an object has gone beyond the screen edge. Is there a code ref for “screen edge”?.
I’m thinking in the lines of
if(myObject.position([]) >= myObject.position([0,screenEdge0]))
{
myObject.position([0,screenEdge,0]);
}
Basically, if it’s equal or goes beyond then it stays where it is.