Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an example of using a pixi mask with spine? #31

Closed
mreinstein opened this issue May 12, 2015 · 6 comments
Closed

an example of using a pixi mask with spine? #31

mreinstein opened this issue May 12, 2015 · 6 comments

Comments

@mreinstein
Copy link

I'm trying to place a mask on a spine object, but I'm a bit confused due to the anchoring of spine objects being treated a bit differently. Can anyone shed some light on this?

@ivanpopelyshev
Copy link
Collaborator

Spine objects are anchored by point (0,0) in spine editor :)

@mreinstein
Copy link
Author

@ivanpopelyshev it seems that spine objects are anchored to bottom center (0.5, 1) not 0,0 as far as I can tell.

@ivanpopelyshev
Copy link
Collaborator

@mreinstein Spine editor has its own coordinate system. (0,0) in that system is an anchor. In most cases it is bottom center.

@mreinstein
Copy link
Author

but what do I do at runtime, in my game? How do I set up a mask that partially obscures my spine animation? do I attach the mask to the spine object directly?

@ivanpopelyshev
Copy link
Collaborator

As far as I know Spine object is simple Container. Attach mask directly.

@cursedcoder
Copy link
Collaborator

spine.mask = graphics || sprite should be fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants