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 8813935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:59:05+00:00 2026-06-14T03:59:05+00:00

I am working on a game for a little while now and I worked

  • 0

I am working on a game for a little while now and I worked with convertToWorldSpace by trial & error. It always worked out, but I have no idea what I am doing to be honest. I really hate that I do not understand what I am doing, but unfortunately the Internet does not give much information on this problem. So I hope somebody can explain, why for example I have to call convertToWorldSpace from the node’s parent, and when I use convertToNodeSpace. I have absolutely no clue. Can somebody explain in general what they do and maybe give an example ? I would really appreciate it! 🙂

  • 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-14T03:59:07+00:00Added an answer on June 14, 2026 at 3:59 am

    simply put…

    the world space is the coordinate grid of the screen.

    nodespace is the coordinate grid of the layer.

    cocos2d and most other game frameworks consist of multiple layers within one scene and you would most likely have a bunch of other little nodes/sprites. when you are calculating the coordinates for each sprites in your layer you would be using node space, but however when you get touch locations, it would be in world space so you would need to convert it using convertToNodeSpace etc.

    hope this helps!

    —- edit —-

    maybe an example will help…

     [somenode convertToWorldSpace:ccp(x, y)];
    

    the above code will convert the coordinates (x, y) to the coordinates on the screen. so for example if (x, y) is (0, 0) that position will be the bottom left corner of the node, but not necessarily on the screen. this will convert (0, 0) of the node to the position of the screen.

    [somenode convertToNodeSpace:ccp(x, y)];
    

    the above code will do the opposite. it will convert the coordinates on the screen (x, y) to what it would be on somenode.

    so it comes handy when you have something you want to move (or get the position of or whatever) that’s a child of some other node or layer, since most of the time you want to move the whatever it is relative to the screen rather than within that layer.

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

Sidebar

Related Questions

I have been working on a game engine for the last little while and
I am working on a little text base resultant game, but I am having
I'm working on my first game and I have a little over 20 classes.
I have been programming for a little while now, and I have a question
I have a little archer game I'm working on, and previously in my code
I'm working on a little word game named lingo, but I'm stuck at the
I'm working on a little game where users login. After you have logged in,
I'm working on my First 2D Game with XNA and I have a little
I have a little text based game i am working on. The user has
Alright, so I'm working on a game and I have found out that my

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.