Quantcast
Channel: cocos2d-x - Cocos Forums
Viewing all articles
Browse latest Browse all 2748

Avoid Node from moving erratically during a MoveTo action

$
0
0

@ArkaM wrote:

I have a bottom menu with a slider(similar to Clash Royale and Golf Clash). In the bottom menu, I have to move the slider to the position where the click occurred. I have no issues with the movement, as I am using the generic MoveTo API as follows:

auto moveTo = MoveTo::create(0.2, Vec2(176.88, 57.02));
m_demoNode->runAction(moveTo);
m_childImageofDemoNode->setRotation(1.72);

However, during the movement, the node is exhibiting a behaviour - it is looking like it is jumping for a moment, which could possibly be explained due to the change in rotation, as the rotation changes from 0.0 to 1.72f. Is there any way I could fix this? A solution would be to limit the Y axis during movements, but I could not find any way to do it. Any help would be appreciated.

Posts: 10

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 2748

Trending Articles