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 / A Matrix Bug? or just me

Author
Message
grandpa
21
Years of Service
User Offline
Joined: 3rd May 2003
Location:
Posted: 27th May 2003 13:21
I cant seem to get DBPro to recognize the proper ground height for a matrix if its not positioned at 0,0

Is this a bug or a feature

here is some example code to explain what I mean

thanks in advance for any help
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 27th May 2003 17:39
its not broken just the method to switch the ground height checking needs some more structure.

if the matrix was offset by -4000 you can write a simple statement to say if camera x is less than -4000 then CurrentMAtrix = 2

this wont quite cut it tho in some situations so a sorting method is required to make the jumps.

ill post a method for you later tonight, for now its my public tv fix of start trek.


spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 27th May 2003 17:45
If you have matrix positioned at a different place than x=0,z=0 then you need to make this adjustment in get ground height command.

e.g. if matrix is positioned at 50,100 you need to take these values away from camera coords as ground height is relative to IT'S origin, not the worlds origin.

get ground height(matri,camera position x()-50,camera position z()-100)

Get my drift?

Gronda, Gronda
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 27th May 2003 19:43
here is a sample you can pull apart it assumes all matrices are the same size for it to work correctly




indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 27th May 2003 19:47
i forgot to mention that its naughty not clean up and delete the matrices and 3d media 1.

instead of the do loop

you could replace the do with

disable escapekey
while escapekey()=0



and the loop with

endwhile

this will break out of the main loop after this you can delete the items and finally at the end command.

grandpa
21
Years of Service
User Offline
Joined: 3rd May 2003
Location:
Posted: 27th May 2003 21:10
thanks a bundle, works fabo

I kinda thought I must be doing it wrong

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 27th May 2003 22:12
Skybax
21
Years of Service
User Offline
Joined: 20th May 2003
Location: United States
Posted: 27th May 2003 23:09
I am having a problem with putting a cylinder "Tree" on my matrix...The "tree" appears for a breif second then dissapears. What can I do to fix that? :-s

There is no king who has not had a slave among his ancestors, and no slave who has not had a king among his
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 27th May 2003 23:37
Skybax: Please don't hijack other people's posts - it is not the done thing! Post your code in the thread you created and maybe someone will help!

Gronda, Gronda
Skybax
21
Years of Service
User Offline
Joined: 20th May 2003
Location: United States
Posted: 27th May 2003 23:40
Ooops, sorry about that...

There is no king who has not had a slave among his ancestors, and no slave who has not had a king among his

Login to post a reply

Server time is: 2024-09-20 09:29:34
Your offset time is: 2024-09-20 09:29:34