Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8272097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:01:30+00:00 2026-06-08T07:01:30+00:00

Consider this: you create a new project on Cocos2D 2.0. You have the traditional

  • 0

Consider this: you create a new project on Cocos2D 2.0. You have the traditional Helloworld layer. You add a layer to it with the following structure:

Helloworld (cclayer)
   │
   ┕━ baseLayer (cclayer)
        │
        ┕━ myReducedNode [CCSprite node]
              │
              ┕━ myFullSprite (ccsprite)
                    │
                    ┕━ smallSprite (ccsprite)
  • myReducedNode is a node inside baseLayer, created using [CCSprite node] and has a scale applied to it, so, when I apply that scale I reduce myFullSprite and all smallSprites at the same time.
  • myFullSprite is a 1024×768 points sprite inside myReducedNode.
  • smallSprites are 230×348 points sprite inside myFullSprite.

Consider this craziness:

  • first I apply a scale of 1 to myReducedNode. When I drag smallSprite and check its coordinates, everything is fine. If I position smallSprite on the top left corner of myFullSprite, I read the center coordinate of smallSprite as being (115,594) which is the correct value.
  • I apply a 0.8 scale to myReducedNode. Dragging smallSprite to the same top left corner of myFullSprite, cocos is now reporting the center of smallSprite to be (17,641) ?????????!!!!!!

I am talking about local coordinates, I mean, the position smallSprite is inside myFullSprite.

What is causing this? There’s no apparent logic on this number… This number has no relation with the scale applied to the top node.

What am I missing here? I am banging my head on the wall for days, trying to figure this puzzle!!! thanks.


More information. I hope this helps figure out why the coordinates have those values…

  • baseLayer position is (612, 389) on Helloworld.
  • myReducedNode position is (0,0) on baseLayer.
  • myFullSprite position is (0,0) on myReducedNode
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:01:31+00:00Added an answer on June 8, 2026 at 7:01 am

    after a few changes in code and a several days of research and tries, I conclude this is a bug of Cocos2D or a lack of consistency between how Layers, Sprites and Nodes work (as suggested by LearnCocos2d) , as there’s no way to explain the obtained values. I will try to fill a bug report on that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this bit of obfuscated code. The intention is to create a new object
Consider this code: // Create a Item oject item item = new item(); Compiler
Consider this T-SQL: CREATE USER my_test_user WITHOUT LOGIN; SELECT USER_NAME(), USER, SUSER_SNAME(),SYSTEM_USER, suser_name(); EXECUTE
Consider statement: String s=new String(abc); Will this statement creates two String objects namely abc
Consider this contrived, trivial example: var foo = new byte[] {246, 127}; var bar
Consider an ASP.NET MVC 1.0 project using the Areas convention as described on this
I have this class in Java (it's from JaCoCo Project): public class MemoryMultiReportOutput implements
Consider this code: String first = abc; String second = new String(abc); When using
Consider this code: static void Main(string[] args) { var persons = new List<Person> {
Consider that I have a MainWindow that has the following button declared in its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.