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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:35:02+00:00 2026-06-17T04:35:02+00:00

In sample from Cocos2d-x Tutorials when we describe actionMove CCFiniteTimeAction* actionMove = CCMoveTo::create( (float)actualDuration,

  • 0

In sample from Cocos2d-x Tutorials when we describe actionMove

CCFiniteTimeAction* actionMove = 
CCMoveTo::create( (float)actualDuration, 
ccp(0 - target->getContentSize().width/2, actualY) );

we set a point ccp(0 – target->getContentSize().width/2, actualY). If we have target with 20 width then we have point (-10, actualY), and half target must be visible, but it’s not so. Why?

Initial target position

target->setPosition( 
  ccp(winSize.width + (target->getContentSize().width/2), 
  actualY) );

Here we also divide by 2, but I understand it (winSize.width + any number and target becomes invisible, outside the screen).

  • 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-17T04:35:03+00:00Added an answer on June 17, 2026 at 4:35 am

    Cocos2d-x uses the center of the object as the origin/anchor point, rather than the corner. So if you want half of your object to be visible on the edge of the screen, use:

    ccp(0, actualY)
    

    or

    ccp(winSize.width)
    

    You add half of the contentSize if you want the object to be completely off the screen.

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

Sidebar

Related Questions

I'm just reading this sample from the Dapper manual: connection.Execute(@ set nocount on create
I am new to the cocos2d framework, so I took the sample application from
I am using the FileUpload sample from the asp.net tutorials. When I build it
here's my sample from the libgdx android game that I want to create. Nothing
I'm working with Cocos2D and I've made a very simple class that inherits from
I see all sample from nServiceBus to be a standalone process, so can it
I copied rich push sample from the UrbanAirship.com. And initialize the airship in the
I'm trying to run the sample from the sinew source code, but it's not
I've looked at other questions related to the GLPaint sample from Apple. Maybe I'm
I am currently using a Python 2.5 sample from the ANTLR website. I'm actually

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.