Hmmm... I'm asuming you've already tried something like this?
XPrevious#=Object Position X([Obj#])
YPrevious#=Object Position Y([Obj#])
If Object Screen X([Obj#])<10 or Object Screen X([Obj#])>630 Then Position Object [Obj#],XPrevious#,Object Position Y([Obj#]),Object Position Z([Obj#])
If Object Screen Y([Obj#])<10 or Object Screen Y([Obj#])>470 Then Position Object [Obj#],Object Position X([Obj#]),YPrevious#,Object Position Z([Obj#])
If that doesn't work... you could try this "slightly" more complicated meathod...
Find the position of three Points Infront and to each side of the camera... lets call them point A,B, and C where A is the point directly ahead of the camera... Each "Point" should be positioned the same distance away from the camera and point B and C should be at 90* angles from the camera angle...(Still Following?)... Then check the distance [D=Sqrt((X1-X2)^2+(Y1-Y2)^2+(Z1-Z2)^2)] from each of the three points to the object that needs to stay inside the camera veiw and store them in three variables... DistA#,DistB#,DistC#... Then compare DistB# and DistC# with DistA#... If DistB#>DistA# and DistC#>DistA# then the object is within the camera view... If DistB#<DistA# and DistB#<DistC# then the object is outside the camera view and needs to be moved to the right... When Points A,B, and C are the same distance from the camera then the inscreen cutoff is at 45* on either side... moving point A closer to the camera will narrow the area the object can be within while positioning point A further away will widen the area...
Thats a mouthfull... I'll try to draw you a diagram...
Object Inside Camera View...
__\_______________/__
___\_____________/___
____\__Obj______/____
_____\_________/_____
______\_______/______
_______\__A__/_______
________\___/________
_____B__Cam__C_____
Object Outside Camera View...
__\_______________/__
___\_____________/___
____\___________/____
_Obj_\_________/_____
______\_______/______
_______\__A__/_______
________\___/________
_____B__Cam__C_____
Arkheii's meathod would work also, but you would have to get Nuclear Glory (Which I would get anyways... very usefull) and you would have to make a 3D triangular prisim model...
well... I hope I helped...
The computer isn't an addiction, its more of a mental and social dependancy.