On Mon, Oct 13, 2008 at 4:58 PM, Kao Cardoso Felix <[EMAIL PROTECTED]> wrote: > >> you cant really use this on step calls, because the real positions may >> change later. > > I'm don't know what you mean by step calls. Could you clarify that?
during the scheduled update functions, if things are moving, your node may have already moved, and the other node may have not. > >> is this similar to having the transformation parameters available on >> the "draw" calls? > > I was thinking on just a simple method that inverts / applies the > transformations that are applied to a node, to an arbitrary point. > When I have a mouse click, for instance, I want to check if my sprite > was intercepted by the click and if my sprite is deep on the scene > tree with some transformed parents it's cumbersome to check. > well, yes, you are right in that this is useful outside of draw. this is what i had in mind, convert from screen relative to node position relative coordinates and back. we can update this transformations at each draw call so they are all consistent (and relative to the last frame drawn). in the same way we can keep the viewport information so you know what you can draw or what you can get away without drawing. whats required for this is adding one or two matrix3 multiplications per node in the system each frame. is this too expensive? shoud this be done only on demand? Lucio. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
