public static GsVector ComputeProjectileDirection(float angle) { GsVector v = new GsVector(1, 0); GsMatrix rotMatrix = GsMatrix.CreateRotationZ(angle); return(GsVector.Transform(v, rotMatrix)); }
/// <summary></summary> protected virtual GsVector GetCenter(GsVector offset) { // get the drawing data ImageParams data = GetTextureDrawData(offset); // get the center of the image GsVector center = data.ImageSize.ToVector() / 2f; // compute the transform GsMatrix transform = CreateTransform(data); // return the center transformated return(GsVector.Transform(center, transform)); }