On Mon, Oct 13, 2008 at 6:43 PM, Lucio Torre <[EMAIL PROTECTED]> wrote:
> What do you have in mind for this?

Well, if I would write a method to convert between the coord systems
of any pair of cocosnodes it would involve something like finding a
common parent to the two cocosnodes involved, applying the inverse
transforms of the source node to the point all the way to the common
parent and then applying all the transforms of the destination node to
the point begining at the parent. Hope I was clear enough. It would be
a lot easier to explain if I could draw a picture :)

Anyway, the use case that lead me to look for that would be solved by
just having a method to transform from a cocosnode coord system point
to a screen point (that would involve just go up the scene tree
applying the inverse transforms). Having a way to go from screen to
node coord system would be nice too.

> 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?

> 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.

-- 
Kao Cardoso Félix

Página pessoal: http://www.inf.ufrgs.br/~kcfelix
Blog: http://kaofelix.blogspot.com

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to