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.

DarkBASIC Discussion / need help with command

Author
Message
XTreme
18
Years of Service
User Offline
Joined: 15th Apr 2007
Location:
Posted: 16th Apr 2007 04:12
i used the command load object to load a matrix from another program into my game but now i cant use the command get ground height because it requires a valid matrix so i was wonderin if there was a command that could load my matrix into my game but pass it as a matrix not an object??
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 16th Apr 2007 09:35
Quote: "i used the command load object to load a matrix from another program into my game"


That's not possible - it's still an object not a matrix.

Quote: "i was wonderin if there was a command that could load my matrix into my game but pass it as a matrix not an object"


No. You can only use Get Ground Height on a matrix which was created in your DB program.

TDK_Man

cjb2006
19
Years of Service
User Offline
Joined: 20th May 2006
Location:
Posted: 16th Apr 2007 15:37
Just cast a ray from whatever axis plane is normal to your terrain object. Exp:

TerrainY#=intersect object(ObjNo,SomeXValue,0,SomeZValue,SameXValue,10000,SameZValue)

(Assuming your terrain heights aren't negative.)
cjb2006
19
Years of Service
User Offline
Joined: 20th May 2006
Location:
Posted: 16th Apr 2007 18:06
Oops, Wrong forum. That's a DBP command. Sorry.

Login to post a reply

Server time is: 2025-05-27 20:55:59
Your offset time is: 2025-05-27 20:55:59