I am using PickCanvas class in my application and it is correct to pick a
shape on MOUSE_PRESSED or MOUSE_CLICKED event in MyBehaviour object. Though I
could receive MOUSE_ENTERED or MOUSE_EXITED in MyBehaviour object, the
PickCanvas could not pick a shape (it always returns a null PickResult object
in this case).
My scene graph tree:
BG
|-> TG -> S
|-> TG -> S
|-> Behaviour
I am very appreciate if you could give me some advices. Thanks in advance.
cc - 28 Nov 2006 09:13 GMT
Perhaps, some properties should be setted in your shape object .
sanbikinoraion - 28 Nov 2006 09:45 GMT
> I am using PickCanvas class in my application and it is correct to pick a
> shape on MOUSE_PRESSED or MOUSE_CLICKED event in MyBehaviour object. Though I
[quoted text clipped - 7 lines]
> |-> TG -> S
> |-> Behaviour
As another commenter says, ensure that you have set the shapes to be
pickable by setting the capabilities appropriately (something like
"shape.setCapability(ENABLE_PICK_REPORTING);").
Also, if you've written a custom picker, I suggest making sure that it
can pick something even in the most simple of circumstances (ie. knock
up a scene graph with a huge cube bigger than the viewport and set the
pick to run with x-y parameters 0 0, etc.