Skip to content

Instantly share code, notes, and snippets.

@seanh
Created November 29, 2010 16:36
Show Gist options
  • Select an option

  • Save seanh/720164 to your computer and use it in GitHub Desktop.

Select an option

Save seanh/720164 to your computer and use it in GitHub Desktop.
CGRect convertRectToWorldSpace(CCNode *node, CGRect rect)
{
CGPoint globalOrigin = [node.parent convertToWorldSpace:rect.origin];
CGRect globalRect = CGRectMake(globalOrigin.x, globalOrigin.y, rect.size.width, rect.size.height);
return globalRect;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment