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 / Matrix Height Error

Author
Message
Ace Of Spades
19
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 18th Apr 2005 03:11 Edited at: 18th Apr 2005 03:11
Im using a heightmap to create a formed matrix, my character entity moves by collecting the matrix height and that position and positioning itself above the matrix. The problem is i changed my heightmap to raise everything up by 100 units, but my character still stays at the original matrix hieght of 0 rather than raising itself above it.

My code is:


Can someone tell me what I am doing wrong?

Thanks.

[EDIT]
and here are the functions if they are important:
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 19th Apr 2005 12:37
Hi Apolloed. I've gone through your code (good work btw) a few times and I don't see anything that is causing the issue. If you want to post the heightmap (or a similar one if you want to keep it offline at this time), I'll run some tests on it to see if there's some issue with the heightmap or maybe some type DBPro or Direct X feature that's causing the problems.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 19th Apr 2005 23:17
The problem is you are texturing matrix using:

fill matrix 1,0,1

this command also resets all your heights to 0

Infact you don't even need it as textureMatrix function loops through every tile and textures each tile to 1 anyway

Boo!
Ace Of Spades
19
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 20th Apr 2005 01:38
Quote: "this command also resets all your heights to 0"


Well I could visually see the the heights were not at 0 when I ran the code. Anyway, I have completely remade the code and taken things out of functions and it seems to work fine now
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 20th Apr 2005 02:51
OK, I'll explain a bit more.

UPDATE MATRIX visually changes the matrix according to what you have set heights to. Just setting matrix heights does not instantly change heights on screen because it is processor intensive.

So you first run 'setupMatrix' which makes matrix, sets heights to levels in heightmap, then you correctly 'update matrix'.

You then run 'textureMatrix' which fills heights with 0 and tile number 1, but you then don't 'update matrix'. So internally all the matrix heights are zero, but visually they are from last 'update matrix' which is heightmap heights.

Hope that explains things.

Boo!
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 20th Apr 2005 03:14
Quote: "(good work btw)"


That code is took exactly from the monster hunt tutorial?

Ace Of Spades
19
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 20th Apr 2005 05:53
Quote: "That code is took exactly from the monster hunt tutorial?"


Yes, the movement was taken from the monster hunt tutorial(it's good stuff, what can i say), but the rest is mine.
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 20th Apr 2005 06:06
ah sorry...just read it wrong!

Login to post a reply

Server time is: 2024-09-23 17:25:06
Your offset time is: 2024-09-23 17:25:06