Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCPhysicsNode's scale doesn't scale shapes... #900

Open
iMobCoding opened this issue Jul 25, 2014 · 2 comments
Open

CCPhysicsNode's scale doesn't scale shapes... #900

iMobCoding opened this issue Jul 25, 2014 · 2 comments

Comments

@iMobCoding
Copy link
Contributor

I have several CCNodes added to CCPhysicsNode. When I scale CCPhysicsNode, shapes aren't scaled for children nodes. Don't know if that's a bug or intended behavior, but how can I apply parent's transform to all shapes?

To be precise, I have to run [shape pointQuery:] for node.physicsBody.body.shapes but I get wrong results when CCPhysicsNode is scaled...

Best

@iMobCoding
Copy link
Contributor Author

I just realized there are other bugs regarding the CCPhysicsNode and shapes. Even if you don't scale CCPhysicsNode at all, but e.g. you define its content size in points instead of normalized size, then shapes are different/wrong when you run it on iPhone 3.5" and 4". If you can't easily reproduce the issue please tell me to send sample project. Just to remind you, you can't see the wrong shapes when you just enable debugDraw, because debugDraw is added as a child of CCPhysicsNode so it shows correct shapes because debugDraw gets correct parent's transform. But actual shapes are still wrong...

@bchessin
Copy link

bchessin commented Aug 6, 2014

Same issue here. It would be nice if the scale of the physic node's children changed along with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants