andgamer wrote:Can you guys help me out to calculate the rotation angle?
andgamer wrote:Is triangle stripe helpful? if so then how can I draw triangle stripe in the scene?
andgamer wrote:Thanks skyuzo
I will try by angle calculation. I will post the solution if could find any or ask for the help if face any problem.
badchoice wrote: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)
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
Users browsing this forum: No registered users and 14 guests