I want to rotate a object when hit by an other object.
After the impact the object has to settle back to his origonal position. (damping)
At the moment the object is bugging : strange rotation, shoots away from the screen.
I'm using cocos2d-x.
This is what I tried for the moment
cpConstraint* pivotJoint = cpPivotJointNew(_space->staticBody, _body, _body->p);
pivotJoint->maxBias =100.0f;
pivotJoint->maxForce = 100.0f;
cpSpaceAddConstraint(_space, pivotJoint);
Pivot Joint cocos2d-x
-
- Posts: 2
- Joined: Mon Mar 17, 2014 10:08 am
- Contact:
Re: Pivot Joint cocos2d-x
I've found the solution myself .
I just added a damped spring joint
I just added a damped spring joint
Who is online
Users browsing this forum: No registered users and 12 guests