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.

Dark GDK / 3D Math Commands

Author
Message
Murder
20
Years of Service
User Offline
Joined: 30th Jul 2004
Location: Cybertron
Posted: 20th Oct 2006 09:42
ok, so I\'m trying to use some of the 3D Math commands.. Dot product in particular... this is what I\'m doing

sObject* pC_player = dbGetObject(nPlayerID);

D3DXVECTOR3 v_Test( 0, 0, 1);

float f_dot = dbDotProductVector3(*v_Test, *(pC_player->position.vecLook));

i always get a value of zero?
i checked the value of vecLook, seems to be ok

i had to manually include DarkSDK3DMaths.h to my main.. and i had to go in and declare MAX_STRINGS to some const cause it couldnt find it... could this have anything to do with my problem?

Thanks,

"You have to beat the man.....To be the man"
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 20th Oct 2006 10:13
you've slightly misinterepted the 3dmaths commands - understandable as I think your way possiably makes a bit more sense

Using the dgdk you do not store your own vectors and matrices etc, you ask dgdk to create them and it stores them for you internally and provides you with commands to retrive values from them. When the 3d maths commands ask for a vector parameter they mean the integer identifier for the vector stored inside dgdk - just like how the object commands need an object id see? its the same thing. Your code would read something like this:



I hope that helped

Murder
20
Years of Service
User Offline
Joined: 30th Jul 2004
Location: Cybertron
Posted: 21st Oct 2006 00:16
ahhhh.. i see.. ok thats why the function takes int's as parameters..

Thanks for the help Sephnroth!

Back to buisness

"You have to beat the man.....To be the man"

Login to post a reply

Server time is: 2024-11-19 08:37:44
Your offset time is: 2024-11-19 08:37:44