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 / Issues with matrix collision

Author
Message
tbull74
14
Years of Service
User Offline
Joined: 13th Dec 2009
Location:
Posted: 18th Dec 2009 01:36 Edited at: 18th Dec 2009 01:51
Hey guys, I had it working i thought until i textured the matrix. Now i can seep in and out of parrts of the matrix while i collide with others. Anyone know a fix?
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 18th Dec 2009 20:52
The cause of your problem is possibly because the matrix has been moved from position 0,0,0 and you may not have taken this into consideration.

So, the object's position X (in 3D space) does not correspond to the matrix directly below it (because you've moved it) and this is messing with the calculations.

Either don't move the matrix, or take the matrix offset amount into consideration.

TDK

tbull74
14
Years of Service
User Offline
Joined: 13th Dec 2009
Location:
Posted: 19th Dec 2009 01:27
thats really stupid, i cannot position a matrix without having cllision issues? how does one work with matricies for a games landscape?! Is there no workaround at all?
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 19th Dec 2009 08:21
hi,TDK

Is POSITION_MATRIX command broken?
Veron
17
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 19th Dec 2009 10:31
I doubt anyone uses matrices for a full game landscape, personally I really dislike them for anything more than quick testing.

Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 19th Dec 2009 20:51
The workaround is to offset x# and z# checks to the matrix offset

G# = get ground height(1,X#-2500,Z#-2500)
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 20th Dec 2009 00:01
Quote: "Is POSITION_MATRIX command broken?"


No. Think of two scenarios:

1. Matrix at 0,0,0. When your player is at X=100 and Z=100 then it is standing on the matrix at X=100, Z=100 as 3D space and the matrix X/Z positions are the same.

2. The Matrix is shifted -2500 units on the X and Z axis. Now, when the player is at X=100 in 3D space, the matrix position below it isn't the same. As Scorpyo says, you have to deduct the matrix offset amount from both the player's X and Z position.

TDK

pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 20th Dec 2009 08:15
say,
position matrix 1,-2500,-15,-2500
G# = get ground height(1,X#-2500,Z#-2500)

I am don't works.
This test.

offset 0 - good
POSITION MATRIX 1, 0, 0, 0
y#=get ground height(1,x#,z#)+5



offset -100 - broken
POSITION MATRIX 1, -100, 0, 0
y#=get ground height(1,x#-100,z#)+5

Login to post a reply

Server time is: 2024-11-16 09:25:27
Your offset time is: 2024-11-16 09:25:27