Fix a bug for off-center vector fields

This commit is contained in:
Grant Sanderson 2021-03-24 13:58:18 -07:00
parent 6c3e4b94ea
commit 01d989ba23

View file

@ -131,7 +131,7 @@ class VectorField(VGroup):
origin, _output, buff=0, origin, _output, buff=0,
**vector_config **vector_config
) )
vect.shift(_input) vect.shift(_input - origin)
vect.set_rgba_array([[*self.value_to_rgb(norm), self.opacity]]) vect.set_rgba_array([[*self.value_to_rgb(norm), self.opacity]])
return vect return vect