Hi Looda,
thanks for the nice monogame implementation.
is there a easy way to get action point information?
i use this as helper method:
public Vector2 GetPointPosition(string pointName) {
if (hasPoint(pointName)) {
return new Vector2(
animator.FrameData.PointData[pointName].X,
animator.FrameData.PointData[pointName].Y);
}
return Vector2.Zero;
}
private bool hasPoint(string pointName) {
return animator.FrameData.PointData.ContainsKey(pointName);
}
but this gives me only the original spriter point without scaling, flipping or rotation from the base animation.
So my question is: Is there a way to get the transformed action point or a helper to do this for me?
Background:
Im making a mono game with mouse aim (run and gun style). So i m having a player animator with feet, body and head.
And a 2. animator with the arms and gun animation. i rotate the arms animation to point toward the mouse.
animationArms.Rotation = rotation;
But the action point at the gun for spawning bullets is not rotated.
regards alex