Hi! I'm working on a RPG and I just realized the my 3d mouse coordinate code does not work with the Y axis. It always positions my cube at position 0 on the Y axis (but it works perfectly for the X and Z axis). Here's the code I'm using:
//3D Mouse Coordinates
dbPickScreen ( dbMouseX ( ), dbMouseY ( ), dbCameraPositionY ( ) );
float mult = dbABS ( dbCameraPositionY ( ) / dbGetPickVectorY ( ) );
float _XV = dbGetPickVectorX ( ) * mult + dbCameraPositionX ( );
float _YV = dbGetPickVectorY ( ) * mult + dbCameraPositionY ( );
float _ZV = dbGetPickVectorZ ( ) * mult + dbCameraPositionZ ( );
float _OldVectorX = dbObjectPositionX ( Player.MovementVector );
float _OldVectorY = dbObjectPositionY ( Player.MovementVector );
float _OldVectorZ = dbObjectPositionZ ( Player.MovementVector );
dbPositionObject ( Player.MovementVector, _XV,_YV, _ZV );
SC_UpdateObject ( Player.MovementVector );
I'm not sure why this is happening, so any help would be greatly appreciated!
Use Google first... it's not rocket surgery!