ManimCommunity / ManimCommunity/manim

Error in center of rotation for add_fixed_orientation_mobjects()

Open
#4,644 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

### Error in center of rotation for `add_fixed_orientation_mobjects()`
The calculated center for fixed orientation mobjects is incorrect for text strings. Specifically, the text's center of rotation is placed on the left edge of the text, instead of the center given from `.get_center()`.

**Code**:

```py
from manim import *

class Start(ThreeDScene):

def construct(self):

self.add(ThreeDAxes())
text = Tex("Some Long Text")
self.add_fixed_orientation_mobjects(text)
self.interactive_embed()
```

## Images of Incorrect rotation:

Images

Image
Image
Image

## Additional comments
Ran using the OpenGL renderer on Mac

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the provided ThreeDScene example using the OpenGL renderer and inspect add_fixed_orientation_mobjects() with a Tex object. Compare the rotation center with text.get_center(); done means the text rotates around its actual center rather than its left edge.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.