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 / End of matrix

Author
Message
Necrum
21
Years of Service
User Offline
Joined: 31st Dec 2002
Location:
Posted: 21st Jan 2003 03:55
How do you detect collision at the end of a matrix? I want to keep the player inside the matrix, maybe even program a visual barrier.
Just when you thought life was done beating your sorry ass down, it invites friends to help.
Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 21st Jan 2003 14:04
Supposing your matrix is 1000 units wide in x and z directions:

put this within the Do-Loop or in a gosub called from within the Do-Loop

if x#<0 then x#=0
if x#>1000 then x#=1000
if z#<0 then z#=0
if z#>1000 then z#=1000

hope it helps
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 21st Jan 2003 14:08
Yea- but you have to position the object at those coords as well

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Necrym
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: Australia
Posted: 25th Jan 2003 03:09
you could detect the edge as above or make an invisbile plain object to collide against for the end points.

Watch the bouncing cursor - now in 3d

Login to post a reply

Server time is: 2024-05-17 19:16:40
Your offset time is: 2024-05-17 19:16:40