I've been stuck with rotating an asset with an offset.
Sstart = e.GetPosition(dial); if (dial.IsStylusCaptured) { AngleRot = Math.Atan2((Y - Sstart.Y) , (X - Sstart.X)); radAngle = AngleRot / Math.PI * 180 + 180; radAngle = radAngle - AthetaD; di.RenderTransform = new RotateTransform(radAngle + 90); } Using this I was able to rotate my object from 0° with an offset of x to angle theta. But when I make a second rotation, instead of it rotating from angle theta with an offset x it resets the object back to 0°. How can I make it so the offset is always from theta and not 0°?
https://stackoverflow.com/questions/67249390/angle-offsets-and-positive-negative-angles April 25, 2021 at 11:06AM
没有评论:
发表评论