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 / staying on the matrix

Author
Message
Poison04 Forum
16
Years of Service
User Offline
Joined: 24th May 2008
Location:
Posted: 25th May 2008 15:17
Another noob question. I hav randomized my matrix and im having trouble getting my charactor to stay on the matrix when it moves. Please help.
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 25th May 2008 19:56
you must check the ground height at player position

see the Playercontrol: bit

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 25th May 2008 23:45
Note also that Get Ground Height only works if you have not used the Position Matrix command.

If you have, then the matrix heights returned will all be as if the matrix was still at 0,0,0 so you'll have to compensate for this manually.

This is because the Get Ground Height command uses matrix co-ordinates not the real world co-ordinates that Object Position X(), Y() and Z() uses.

So, when the matrix is at 0,0,0 the X and Z matrix co-ordinates of your player are the same as in 3D space. If the matrix is moved, the player may be at X=100 Z=100 in 3D space, but the position on the matrix below his feet will not be and the height returned will be from a different part of the matrix - depending on how far it was moved.

TDK_Man

Login to post a reply

Server time is: 2024-09-27 14:20:17
Your offset time is: 2024-09-27 14:20:17