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 / Intersect Objects

Author
Message
lcfcfan
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location: North East, UK
Posted: 10th Sep 2004 01:03
I'm trying to figure out walking and collision on a .x level, i'm doing the walking part at the minute and i'm having a problem with my code i thought that the command intersect object would get the y position of the camera and the y position of the floor and then position the camera at the cameras y position + 10 but my code does not seem to work can someone tell me where i'm going wrong cos i've been trying to figure this out for a few days now but no luck.


Thanx

Graham
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 10th Sep 2004 06:24
i#=intersect object (1,cax#,player#-5,caz#,opx#,floor#+5,opz#)

you must put the same x# and z# values at both places

i#=intersect object (1,cax#,player#-5,caz#,opx#,floor#+5,caz#)

second reason it may not work ( unless the "x land" is totally flat and at height 0.0) is that from -5 to 5 is a very small y# span, normally you should cast from higher than your highest y# point in the ground ( same for lowest), otherwise intersect object may check intersection at a height where there is nothing to intersect.
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 10th Sep 2004 06:25
edit:

i#=intersect object (1,cax#,player#-5,caz#,cax#,floor#+5,caz#)

Login to post a reply

Server time is: 2024-09-22 23:38:21
Your offset time is: 2024-09-22 23:38:21