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 / tree problem

Author
Message
LOTR HITMAN
20
Years of Service
User Offline
Joined: 2nd Nov 2004
Location:
Posted: 11th Apr 2007 02:38
i am having problems with the trees on my matrix. they appear completely off it, or a few will be on it, but most of them are grouped in the same place right next to each other off of the matrix. how can i make them all stay on there, and be more spread out?

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Apr 2007 09:25
First of all, in the above code you don't appear to be using a matrix.

As the matrix code isn't there, there's no reference to it's size or position.

If you haven't moved it, then the position of the trees is simply:

X Position = random number >=0 and <=MatrixPixelWidth
Y Position = Get Ground Height + half the height of the tree object
Z Position = random number >=0 and <=MatrixPixelHeight

TDK_Man

LOTR HITMAN
20
Years of Service
User Offline
Joined: 2nd Nov 2004
Location:
Posted: 11th Apr 2007 20:55
here's the code for my matrix.



and i don't understand what you said last time. is that the code i should use?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Apr 2007 00:43


TDK_Man

Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 20th Apr 2007 10:59
Al Moast Like The Monster Hunt Tutorial.
But How About Collision&More Object`s&Collision

Stig Magne Risnes Berger

Login to post a reply

Server time is: 2025-05-29 05:46:30
Your offset time is: 2025-05-29 05:46:30