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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:49:29+00:00 2026-06-06T10:49:29+00:00

I am a bit confused on when to use CC_CONTENT_SCALE_FACTOR() in my app. I

  • 0

I am a bit confused on when to use CC_CONTENT_SCALE_FACTOR() in my app. I use Box2D for collision detection, and I make a b2Body of vertices. Now should I divide each point only by the PTM_Ratio or by the PTM_Ratio multiplied by CC_CONTENT_SCALE_FACTOR()?

Should I be using CC_CONTENT_SCALE_FACTOR() anywhere in my app if I am not dealing with pixels? Should I only use CC_CONTENT_SCALE_FACTOR() for GLESDebugDraw like this?

_debugDraw = new GLESDebugDraw( ptmRatio * CC_CONTENT_SCALE_FACTOR()); ?

Thanks!

  • 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-06T10:49:31+00:00Added an answer on June 6, 2026 at 10:49 am

    The Box2D world doesn’t care in how many pixels it is rendered in. Box2D is completely oblivious to screen resolution, therefore you don’t and shouldn’t scale any content whether you’re on a Retina display device or not.

    There’s currently only one aspect where you might need CC_CONTENT_SCALE_FACTOR and that is when working with tilemaps. If I remember correctly, the tileset width and height properties are given in pixels, not points. Therefore you need to divide by CC_CONTENT_SCALE_FACTOR to get the correct size in points. Not sure why that’s not done by cocos2d internally.

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

Sidebar

Related Questions

http://github.com/uswaretech/Django-Socialauth/tree/master/socialauth/ I'm a bit confused on how I should use this. Of course, I
I'm a bit confused when to use overflow:hidden to make sure the the parent
I am a bit confused. I wrote a Java stand alone app and now
I'm a bit confused about the use of all the IEnumerable<T> extension methods, intellisense
Perhaps I'm a bit confused about when to use the waitForPageToLoad command, but what
I'm a bit confused with this: can I use PHP variables in a pg
i'm a bit confused, when we release a pointer or use nil to the
Just wondering when do you actually use $.get(index); I am a bit confused on
I always get confused when I am about to use a bit map to
I'm a bit confused about the size of my App! The folder and all

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.