3b1b / manim

Animation engine for explanatory math videos
MIT License
62.93k stars 5.83k forks source link

Vectors in 3D don't adjust ArrowTip correctly #907

Open Involution124 opened 4 years ago

Involution124 commented 4 years ago

For example vector = Vector((2,2,2)), the arrow tip will only align to the x-y plane which is really frustrating. I think it has to do with the way the tip is repositioned (rotation).

Strangely enough when you initially position the vector in the X-Y plane, then rotate it around a circle, it appears to maintain the correct positioning? I'd imagine something like that would be an adequate fix to it, as right now it's a simple degree rotation which doesn't encapsulate the third dimension.

omartinezm commented 4 years ago

I remember that problem with Vector. I solved it using this piece of code

myVec=CurvedArrow(start_point=ORIGIN,end_point=(2)*RIGHT+(2)*UP+(2)*OUT,angle=0*DEGREES,color=GOLD_D)

Hope this works for you.

murilo-cunha commented 4 years ago

Issue #774 may help you