I am looking at Protoeditor, I think I have it mostly figured out, but... What is this restricted_fx variable that is called from an instance of cocos.layer.Scrolling_Manager().
My scroller doesn't have that variable, and I think faking it is breaking things. Thanks, Andy On Oct 3, 5:07 pm, Andy <[email protected]> wrote: > I am sure you already know this, but you are full of awesome. > > That is exactly the behavior I am looking for. Just need to adapt the > code now > > Thanks, > andy > > On Oct 2, 9:16 pm, claudio canepa <[email protected]> wrote: > > > > > > > > > On Sun, Oct 2, 2011 at 5:36 PM, Andy <[email protected]> wrote: > > > I want to zoom around my cursor location. I can get the mouse > > > information and convert it into layer coordinates, so that is not a > > > problem. > > > > Given a world coordinate, how do I scale around that point? My > > > understanding is that scaling happens around the transform_anchor, and > > > zooming will happen around the transform_anchor of my scrolling > > > manager. But when ever I move the transform_anchor, I think it takes > > > all my sprites with it. > > > > How do I go about scaling around a given point? > > > > Thanks, > > > Andy > > > We have an editor that zooms around the mouse pointer, I think the zoom > > code there can be near to what you want. > > > You can see the editor code > > athttp://code.google.com/p/los-cocos/source/browse/branches/protoeditor... > > > Look at lines 413 - 440 , they handle the zoom. > > > Protoeditor is work in progress, not ready to use as editor, but if if you > > want to see how the zoom looks you must checkout the branch and launch from > > samples/runner/start_editor.py > > > I'm very short on time so I will not expand about the code, feel free to ask > > for clarification. > > > -- > > claudio -- 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.
