mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Merge pull request #1364 from abhi-6988/fix-3d_vectors
Fix Vector orientation in 3d
This commit is contained in:
commit
2493458e45
1 changed files with 4 additions and 0 deletions
|
@ -636,6 +636,10 @@ class Arrow(Line):
|
|||
super().scale(length / self.get_length())
|
||||
|
||||
self.rotate(angle_of_vector(vect) - self.get_angle())
|
||||
self.rotate(
|
||||
PI / 2 - np.arccos(normalize(vect)[2]),
|
||||
axis=rotate_vector(self.get_unit_vector(), -PI / 2),
|
||||
)
|
||||
self.shift(start - self.get_start())
|
||||
self.refresh_triangulation()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue