Jump to content

Action triggered even if other mesh was clicked


Kesshi
 Share

Recommended Posts

14 hours ago, satguru said:

I like the idea of predicate but I wonder if it  should be at the action level rather than at the scene level.

I think its enough to have it at scene level. Its up to you how complex you make the predicate. If you want to check if a specific action is attached to a mesh you can do that.
Having it at action level also can create conflicts. Lets say a mesh has two actions. Action one says "pick it" and action two says "don't pick it".
 

Link to comment
Share on other sites

@Kesshi

At scene level the predicate becomes applicable to all actions and all mesh

That may or may not be desirable.

If different actions need different pick result then the predicate will have to figure out which action called it and return appropriate  result.

 

Now there is one case where setting predicate at scene level does help.

scene has "onPonterDown", "onPointertUp" and so on functions

For these the predicate like "pointerDonwPredicate" , "pointerUpPredicate" makes perfect sense.

BUT ! :)

@Deltakosh

There is an issue with the current predicate implementation

Currently the "isPickable " property is completely ignored.

I think it should only be ignored if the predicate is not set

The behavior should be like that of scene.pick() function.

One of my app uses "scene.onPointerDown". 

It stopped working when i downloaded the latest dist.

Had me scratching me head for sometime before I realized what happened..

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...