Re bbPickedTime Docs

Archives Forums/Blitz3D SDK Programming/Re bbPickedTime Docs

H&K(Posted 2007) [#1]
Function bbPickedTime()
Description Returns a value between 0.0 and 1.0 representing the distance along the bbLinePick at which the most recently picked entity was picked.
?


big10p(Posted 2007) [#2]
That's correct. What's your question? I agree that the name PickedTime is a bit misleading, though, as the command has nothing to do with time. :)


H&K(Posted 2007) [#3]
That's correct. What's your question?
Are you really really sure thats what it does? Cos honestly, it would be usless at it, what with it returning an INT thats supposed to be between 0 and 1.0, and if it really comes down to it, why its name is so missleading.

Anyway my question is why does it say different in the B3d Docs.

PickedTime ( )
Parameters:
None.
Description:
Returns the time taken to calculate the most recently executed Pick command. This might have been CameraPick, EntityPick or LinePick.


Barnabius(Posted 2007) [#4]
How about someone making a simple mistake while writing docs?

Barney


DJWoodgate(Posted 2007) [#5]
I suspect some of the docs were written by a third party a long time ago who assumed that was what the function did.


big10p(Posted 2007) [#6]
As Barnabius says. Whoever wrote that didn't actually understand what the command does. And, it definately should be returning a float. :)

I actually found this command very useful in a model viewer I wrote. I used it to scale the mouse cam zoom rate, so that it zooms quickly when at a fair distance from the model, and then gradually decrease the speed the closer to the model the camera gets. Worked a treat.


H&K(Posted 2007) [#7]
So 1)Which Docs are correct? 2)Does it return a float then or not?


big10p(Posted 2007) [#8]
Function bbPickedTime()
Description Returns a value between 0.0 and 1.0 representing the distance along the bbLinePick at which the most recently picked entity was picked.
^^ That's correct.

It returns a float in Blitz3D. Can't vouch for the SDK as I don't have it. If it doesn't return a float, that's a bug.


H&K(Posted 2007) [#9]
Function bbPickedTime()="bbPickedTime"

It returns an INT, which is what the B3d docs would imply.

So...... Its definatly a bug of some sort, cos the docs and the returns dont match


big10p(Posted 2007) [#10]
Function bbPickedTime()="bbPickedTime"


???


H&K(Posted 2007) [#11]
????
Oh, thats the decleration of the C extern command, without a Type (Int, float etc) it is assumed to be an INT

Hummmm, should PickedNx() (Y and Z) also return floats?


big10p(Posted 2007) [#12]
Yes.


skidracer(Posted 2007) [#13]
The bigger problem is the docs don't specify the return type as float, and the docs are used to generate the language stubs so in this case, it pays to be picky. (ouch)

Fixed in next release.