modifying engine scene node picking
Posted: Thu Jul 12, 2007 9:20 pm
I want to be able to have a scene node remove itself from being picked if it so chooses.
I see an oppertunity in:
getPickedNodeBB in the collision manager source file.
Basically I would have to add a variable to ISsceneNode such as
pickCatagory.
And then I could have categories such as ALWAYS_PICK,IGNORES_BULLETS ...
Either that or have a function pointer stored on it and then the user could have each model object that wants to filter what picks it set that function to something like allowsPick(PICK_TYPE)
I don't know of a better way to get the engine to exclude certain things.
The use case is I'm firing a bullet and I want to have it pick the closest scene node along the bullets path but it shouldn't hit say a powerup thats floating in front of them.
If anyone has any suggestions on a better way to do this I am all ears.
I see an oppertunity in:
getPickedNodeBB in the collision manager source file.
Basically I would have to add a variable to ISsceneNode such as
pickCatagory.
And then I could have categories such as ALWAYS_PICK,IGNORES_BULLETS ...
Either that or have a function pointer stored on it and then the user could have each model object that wants to filter what picks it set that function to something like allowsPick(PICK_TYPE)
I don't know of a better way to get the engine to exclude certain things.
The use case is I'm firing a bullet and I want to have it pick the closest scene node along the bullets path but it shouldn't hit say a powerup thats floating in front of them.
If anyone has any suggestions on a better way to do this I am all ears.