I have roundPath and BoxPath and I would like to do:
id modifyPath = [CCActionTween actionWithDuration:2 key:@"path" from:roundPath to:boxpath];
but I have the error “incompatible type of argument 3 of ‘actionWithDuration:key:from:to:’ Ho w can I solve this please ? sorry for my english I’m french :/
I presume that “path” is a CGPoint type. In that case you can’t use CCActionTween because it only works on built-in data types like BOOL, char, int, float, double but not C structs. CGPoint is a C struct defined as {float x; float y;}.
You can’t use CCActionTween with path.x and path.y either. That’s because you can’t do this in Objective-C:
You could however subclass and add two float properties myX and myY. You can tween both individually and assign them to the position in an update method every frame: