Centered Rotation
See original GitHub issueHi
I am trying to rotate an object on it’s center but cant achieved it. read some info on pivot changing the position but could not figure a way to simply rotate on its center. I am doing this:
var Obj = new PIXI.Graphics();
Obj.beginFill(0x9b59b6);
Obj.drawRoundedRect(0, 0, 100, 100, 15);
Obj.endFill();
Obj.pivot.set(50,50);
Obj.rotation = 3.14159;
But it rotates out of the render, tried Obj.pivot.set(0.5,0.5); like some documentation, but cant get it to keep the position. How is it done?
Thanks
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to disable the centered rotation of a Circle using FabricJS?
In this tutorial, we are going to learn how to disable the centered rotation of Circle using FabricJS. Circle is one of the...
Read more >What is the Center of Rotation? | Study.com
An object's center of rotation is the point about which it is being rotated. An object's center of gravity is the point around...
Read more >How to find the Centre of Rotation - YouTube
Transformations: Rotations, Enlargements and Reflections ... A second problem is worked through to find the center of rotation using ...
Read more >How to find the Center of Rotation - YouTube
Short Video - Maths Tricks. How to find the Center of Rotation. 7.9K views 1 year ago. 贝拉数学课堂 BellaMaths. 贝拉数学课堂 BellaMaths.
Read more >Instant centre of rotation - Wikipedia
The instant center of rotation is the point fixed to a body undergoing planar movement that has zero velocity at a particular instant...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@themoonrat I was, but was having some trouble getting it to work how I expect. I’ve solved the issue now though, by putting the rectangle in a Container then pivoting that container. Some of Ivan’s info here was helpful: http://www.html5gamedevs.com/topic/37296-scaling-rectangle-from-center-and-transform-origin/ So I think I’m starting to get it.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.