Blockland Forums > Modification Help

Getting an objects id by looking at it.

Pages: << < (3/3)

Pah1023:


--- Quote from: Destiny/Zack0Wack0 on July 17, 2011, 10:11:31 PM ---Woops, sorry.

--- Code: ---%start = %player.getEyePoint();
%end = vectorAdd(%start,vectorScale(%player.getEyeVector(),15));
%ray = containerRayCast(%start,%end,$TypeMasks::All,%player);
%col = firstWord(%ray);

--- End code ---

--- End quote ---
Thanks alot, I appreciate it.

Placid:


--- Quote from: Amade on July 17, 2011, 09:33:19 PM ---player.getEyeVector()

--- End quote ---
i'm looking at this and when i look straight up one of the numbers comes out in ten millions. is there a way of reducing it so it doesn't do something like this? since i'm planning on using this on a vehicle that really wouldn't work.

Amade:


--- Quote from: Placid on July 17, 2011, 11:28:12 PM ---i'm looking at this and when i look straight up one of the numbers comes out in ten millions. is there a way of reducing it so it doesn't do something like this? since i'm planning on using this on a vehicle that really wouldn't work.

--- End quote ---
It's to the power e-006 - meaning that if you multiplied it by 10^-6 (which would make it one million times smaller) that would be the value. Player.getEyeVector() will always be a normalized vector (meaning the length, or if you're going to use it for velocity, speed) will be 1.

Pages: << < (3/3)

Go to full version