 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
hoa123 Guest
|
Posted: Mon Nov 27, 2006 9:50 pm Post subject: Pick a Shape on MOUSE_ENTERED event |
|
|
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. |
|
| Back to top |
|
 |
cc Guest
|
Posted: Tue Nov 28, 2006 3:13 pm Post subject: Re: Pick a Shape on MOUSE_ENTERED event |
|
|
Perhaps, some properties should be setted in your shape object . |
|
| Back to top |
|
 |
sanbikinoraion Guest
|
Posted: Tue Nov 28, 2006 3:45 pm Post subject: Re: Pick a Shape on MOUSE_ENTERED event |
|
|
| Quote: | 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
|
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. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|