Re bbPickedTime Docs
Archives Forums/Blitz3D SDK Programming/Re bbPickedTime Docs
| ||
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. What's your question? I agree that the name PickedTime is a bit misleading, though, as the command has nothing to do with time. :) |
| ||
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. |
| ||
How about someone making a simple mistake while writing docs? Barney |
| ||
I suspect some of the docs were written by a third party a long time ago who assumed that was what the function did. |
| ||
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. |
| ||
So 1)Which Docs are correct? 2)Does it return a float then or not? |
| ||
Function bbPickedTime() ^^ That's correct.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. 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. |
| ||
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 |
| ||
Function bbPickedTime()="bbPickedTime" ??? |
| ||
???? 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? |
| ||
Yes. |
| ||
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. |