I finally solved it all, I have the skeletal system ready, now I'm optimizing it, using pools for objects and transforms that are created a lot of times every frame
To get the angle, the solution was this
1. Create my own sprite with an origin, this origin will be this way
- mysprite.setCenterRotation(origin.x, origin.y)
and
@override
Using java Syntax Highlighting
setPosition(float x, float y){
super.setPosition(x - origin.x, y-origin.y);
}
Parsed in 0.030 seconds, using
GeSHi 1.0.8.4
Whe you have this sprite, for each sprite you have to calculate its rotation, and the rotation is the parent rotation plus its rotation, finally you need to get the new position after the rotation, so first, add the local pos with the parent pos, and then add the rotation pos (using the simple 2d rotation matrix)
Its all on the code, I'll post it here when I have it all completely optimized and easy to use, anyway if anybody wants to help I can share the code I think it can be a good angendine extension
