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

  • Home
  • SEARCH
  • 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 6779313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:22:14+00:00 2026-05-26T16:22:14+00:00

I have a hierarchy like this: Scene  – gameWorld (CCLayer Z:0)     – player (CCSprite

  • 0

I have a hierarchy like this:

Scene
 – gameWorld (CCLayer Z:0)
    – player (CCSprite Z:1)
 – spriteWorld (CCNode Z:0)
    – bgSprite (CCSprite Z:0)
       – enemy (CCSprite Z:0)

The spriteWorld gets rotated and the bgSprite gets moved around so any CCSprites placed on bgSprite has a rotated and moved coordinate system compared to the gameWorld coordinate system.

I need to detected collisions between CCSprites placed both on the gameWorld and bgSprite. Now I have seen this post here:

Cocos2D CCNode position in absolute screen coordinates

which can give me each sprites position relative to the screen, but how do I then calculate or get the bounding box for these sprites? Those bounding boxes are rotate both via the spriteWorld rotation but each sprite also rotates on the bgSprite.

Sounds like a lot of crazy math to me and I am a fool at math, so I really really need help here.

Thank you
Særen

  • 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-26T16:22:15+00:00Added an answer on May 26, 2026 at 4:22 pm

    Indeed, cocos2D has no direct support for collision detection, so you would need to do all your calculations on your own.

    Anyway, you can use a framework like chipmunk-physics or Box2D to do that for you. The basic idea is that you associate a body/shape to your sprite and then setup a collision callback that will be fired when the collision is detected, without worrying about the math…

    Have a look at this article about using Box2D just for collision detection.

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

Sidebar

Related Questions

Lets say I have hierarchy like this (This is just a test program. Please
I have type hierarchy defined like this: interface IMyClass { } interface IBase1<T> {
I have a class hierarchy that looks like this: class Base<TElement> { public TElement
I have a .net solution having a reference hierarchy like this MyWinApp->ServerCore->DataAccess where the
I have a class hierarchy like this public abstract class CalendarEventBase{} public class TrainingEvent
I have a view hierarchy that looks something like this: UIView (A) UIView >
I have a class hierarchy like this: ClassA inherits from NSObject ClassB inherits from
I have an XML hierarchy like this in an XML type column of a
I have a hierarchy of classes like this: MyBox | |->ImageBox |->GalleryBox |->MovieBox |->
I currently have a hierarchy that looks like this MainWindowViewModel TabViewModel EditorViewModel ReviewingServices ConflictFinder

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.