mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Fix Vector orientation in 3d
This commit is contained in:
parent
66817c4e2b
commit
e677f4027a
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