I am unsure what you mean exactly? A screenie might be nice to give us more idea what you mean. I cannot see the problem at the min, and the only thing I can think of is say pac man going from left edge to right edge, etc but still cannot see what the problem is?
Edit - Oh do you mean any angle and position as in asteroids perhaps?
I would imagine the easiest way is to use your co-ordinates and simply flip them on the edge. I can't see what difference 2D or 3D would make to this offhand, apart from making co-ordinates easier to handle as 0 will always be the left edge and 640 the right for instance. Not sure again what you mean by "wall".
Edit - I have done a quick example for you as I am hoping this is what you mean.
Rem Project: testflip
Rem Created: Sunday, May 29, 2011
Rem ***** Main Source File *****
set display mode 640,480,32,1
sync on
get image 1,0,0,32,32,1
make object plain 1,32,32
texture object 1,1
x=0
y=0
z=0
position camera 0,0,-300
do
gosub control
if x<=-260 then x=260
if y>=136 then y=-270
if x>260 then x=-260
if y<-270 then y=136
text 0,0,"X "+str$(x)
text 0,28,"Y "+str$(y)
position object 1,x,y,z
sync
LOOP
control:
if leftkey()=1
dec x
ENDIF
if rightkey()=1
inc x
ENDIF
if upkey()=1
inc y
ENDIF
if downkey()=1
dec y
ENDIF
return
Let me know if this helps or you are after something else. It is very rough and ready and obviously dependent on your scene you will have to play with your co-ordinates.
http://s6.bitefight.org/c.php?uid=103081