Sign in to follow this  
OnGe

Render border arround container?

Recommended Posts

Is there any way to draw border around container, so one can see where container really is? I know container doesnt render, but is there some trick to mock it up?

For context: Im trying to glue some sprites together to create one object. I put them in container and attach it somewhere, but it acts weird. Problem is probably that container has different size than image I can see (i.e. sprites inside container doesnt fill entire size of container, so center of it is somewhere else I think).

 

Share this post


Link to post
Share on other sites

I know. But children may be transparent, out of view or otherwise invisible. Then it inflates container and if you set, for example, container.pivot.x = container.width / 2 and try to rotate it, pivot point is somewhere else than you expected. And its hard to debug such thing. This is why I am looking for some way to outline container.

Share this post


Link to post
Share on other sites

We are getting far from orginal question. But ok, i use it for pivot, so its about rotation. Any better idea? Is there any other way to set pivot on center of object, without working with width/height?

Share this post


Link to post
Share on other sites

In this case, center is half of width and height of container. Here is working example: http://test.onge.cz/sword/

It works fine, if everything in container si at right place. And get broken if something is somewhere else and its hard to find why. Thats why Im looking for way to outline container.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.