Skip to content

Commit

Permalink
Fix a bug for off-center vector fields
Browse files Browse the repository at this point in the history
  • Loading branch information
3b1b committed Mar 24, 2021
1 parent 6c3e4b9 commit 01d989b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manimlib/mobject/vector_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def get_vector(self, coords, **kwargs):
origin, _output, buff=0,
**vector_config
)
vect.shift(_input)
vect.shift(_input - origin)
vect.set_rgba_array([[*self.value_to_rgb(norm), self.opacity]])
return vect

Expand Down

0 comments on commit 01d989b

Please sign in to comment.