Questions tagged [ccrotateby]
6 questions
2
votes
1 answer
Cocos2d Rocking Animation with CCRotateBy?
I'm new to Cocos2d and am after some help.
I have a sprite that I want to rotate 45 degrees to the left, center itself again and then rotate about 45 degree to the right. Sort of like a rocking motion.
I want this done when I touch the actual…

The Learner
- 155
- 11
1
vote
1 answer
How to get position of a sprite having action CCRotate?
I have a node and I've fixed the position of that node. Then I added a sprite as a child of that node (which I've added earlier). After that I try to rotate the node by some angle.
As a result sprite is also rotating and its center point is position…

Amitabha
- 1,664
- 1
- 12
- 30
1
vote
1 answer
cocos2d-x: Rotating CCSprite while moving changes it's final position
I'm trying to make an animation for my game, of an ant leaving it's nest. It should descend the nest going right and down, facing down and then look straight again.
I created two sequences of actions, one for moving and the other for rotating and…

bakkay
- 748
- 8
- 16
0
votes
0 answers
CCRotateBy And CCRotateTo not working with ARM64 Devices correctly
const float gravity = 9.8f;
float L = 0.01f;
double CurrentTime = CACurrentMediaTime();
double angle = 40.0f * sin(sqrt((gravity/L)*CurrentTime));
id rotation = [CCRotateTo actionWithDuration:3.0 angle:angle];
id…

ICoder
- 1,347
- 2
- 13
- 23
0
votes
1 answer
RotateBy Anchorpoint not affecting rotation
In Cocos2d (Android, JAVA), I use CCRotateBy to rotate one CCNode with several tiles in it as children. I want to use the center of the center tile as a point of rotation, so I thought I'd use Anchorpoint.
However, it doesn't matter what value I…

Kees Koenen
- 772
- 2
- 11
- 27
0
votes
1 answer
Determine if CCLayer is currently rotating
I'm rotating an instance of a CCLayer subclass like this:
[self runAction:[CCRotateBy actionWithDuration:0.5 angle:180.0]];
This rotating is in response to a user tap (which may come rapidly). How can I determine if the layer is currently being…

MrDatabase
- 43,245
- 41
- 111
- 153