1
votes

I'm currently discovering Cocos2D in combination with SpriteBuilder and I'm making stuff bounce around.
It's quite fun :)
What I'm trying to figure out is the following :
- On SpriteBuilder, I create a CCSprite, and I enable physics for this one.
- I can invoke it in XCode, and do whatever I want with it. Plus, the sprite is reacting accordingly to the physics settings applied to it. Great.

Now, what I would like to do is to disable the physics from this sprite in the code. I don't find a method in the Cocos2D API that would do the trick.

Can you help me out ?

Thank you for your time and help ;)

1
I think you can do the trick with: sprite.physicsBody.sensor = TRUE;mursang
Man, this is just great, thank you. Have all my Internets :)Jan

1 Answers

1
votes

I write the correct answer then:

sprite.physicsBody.sensor = TRUE;