I have an object which inherits SKNode
where I set its position to a certain point. I add the node to a layer and its position is still set to the same point. The node appears at (0,0) and later on in the completion block of one of its actions I see its position was changed to (0,0).
The SKNode
object has 1 child (particle emitter) whose position is (0,0). (Note the position of the particle emitter should be (0,0) and the node itself (emitter's parent) should be at whatever position I'm setting it to.
Any ideas why this might be happening?
EDIT:
I added
- (void)setPosition:(CGPoint)position
{
[super setPosition:position];
}
to my class and put a breakpoint there. The breakpoint gets hit the first time when I set the position, but never gets hit again. Somehow the position is still (0,0)...
EDIT 2:
SKNode position not working, always going to default 0,0
This post describes my exact problem.