I am having a problem with a simple rotation problem.I have attached a rectangle to a coordinate axes such that one of its vertices align with the origin.I want to translate rectangle center to the origin and rotate the rectangle with respect to the current center.
In init() I translated rectangle’s center to origin.Now I need to rotate it in run(). what Ive done is
The problem is the rectangle is always rotating wrt to the vertex but not the center of the rectangle.what is the problem with my code??Can someone help me please.