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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:23:22+00:00 2026-05-28T07:23:22+00:00

In Cocos2D, I would like a sprite placed on a screen coordinate, not a

  • 0

In Cocos2D, I would like a sprite placed on a screen coordinate, not a map coordinate. I thought I could get by using convertToNodeSpace, but it doesn’t seem to do what I want.

I thought this should place a sprite in the middle of my iPad screen:

selectionScreenOverlaySprite.position = [self convertToNodeSpace:CGPointMake(512, 384)];

But it doesn’t. It also places it in a different place depending on the size of my map. Does anyone know what I should be using? I’ve also tried: convertToWorldSpace, convertToNodeSpaceAR, and convertToWorldSpaceAR.

  • 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-05-28T07:23:23+00:00Added an answer on May 28, 2026 at 7:23 am

    Try this:

    CGSize wins = [[CCDirector sharedDirector] winSize];
    [yourSprite setPosition:CGPointMake(wins.width / 2, wins.height / 2)];
    

    This is better than using hard-coded values because it will work regardless of resolution.

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

Sidebar

Related Questions

I'm not completely sure if this is used with Cocos2d, but I would like
I am creating application in cocos2d, but one thing I would like to know
I would like to start a new scene on cocos2d, but I want to
I would like to know how to draw text/label at specific angle using cocos2d.
I would like to make an iPhone app supporting Portrait & PortraitUpsideDown using cocos2d-iPhone
I'm using the SimpleAudioEngine for cocos2d and when one track finished I would like
I would like to use Cocos2d on the iPhone to draw a 2D car
I am using cocos2d to build an iPhone game. It's mostly done, but along
I would like to add the same sprite animation multiple times. I've tried it
I am building an iPad app with Cocos2d. I would like to transform an

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.