You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have already briefly discussed this with @jtwigg but want to open issue to keep track of wether implementation will be changed or not.
Currently it is not possible to change the type of a CCPhysicsBody from CCPhysicsBodyTypeKinematic to CCPhysicsBodyTypeDynamic because an assert will be triggered as a result off the formerly Kinematic Body still being in the list of Kinematic Bodies:
NSSet * tempKinetics = [_kineticNodes copy];
for(CCNode * node in tempKinetics)
{
NSAssert(node.physicsBody, @"Should have a physics body");
NSAssert(node.physicsBody.type == CCPhysicsBodyTypeKinematic, @"Should be kinematic");
[node.physicsBody updateKinetics:delta];
if(node.physicsBody.type != CCPhysicsBodyTypeKinematic)
{
[_kineticNodes removeObject:node];
}
}
I think it would be useful to be able to change kinematic bodies into dynamic ones. E.g. one could create a throwing animation for a physics body and change the body to be dynamic at the end of the animation.
The text was updated successfully, but these errors were encountered:
I have already briefly discussed this with @jtwigg but want to open issue to keep track of wether implementation will be changed or not.
Currently it is not possible to change the type of a
CCPhysicsBody
fromCCPhysicsBodyTypeKinematic
toCCPhysicsBodyTypeDynamic
because an assert will be triggered as a result off the formerly Kinematic Body still being in the list of Kinematic Bodies:I think it would be useful to be able to change kinematic bodies into dynamic ones. E.g. one could create a throwing animation for a physics body and change the body to be dynamic at the end of the animation.
The text was updated successfully, but these errors were encountered: