Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Invisible wall not much of a wall

Author
Message
CmdrDoughnut
12
Years of Service
User Offline
Joined: 21st Mar 2012
Location:
Posted: 23rd Apr 2012 23:54
I am trying to tell my camera to bounce off of an 'invisible wall" (x=0) and to not go through the wall by changing the direction of the camera when it hits the wall. Is there an easy way to do this? This is my code right now. The camera just flys right thorugh.

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 24th Apr 2012 01:31
Store your camera coordinates before moving it. If your check shows it as out of bounds, you simply restore it to the old coordinates.

Your command,
is incorrect syntax. It should be


So many games to code.......so little time.

Login to post a reply

Server time is: 2024-11-23 20:58:49
Your offset time is: 2024-11-23 20:58:49