Skip to content

[BUG] issue with follow_path not working if object start_pos is not origin #491

@ArbitRandomUser

Description

@ArbitRandomUser
import Javis

video = Video(500,500)
Background(1:100,(args...)->background("white"))

obj = Object(1:100,(args...)->begin
                 box(O,20,20;action=:stroke)
                 return O
             end,O+20)

function path(action)
    p1 = O+20
    p2 = O+200
    newpath()
    arc2r((p1+p2)/2,p1,p2,action=action)
    path1=pathtopoly()
    closepath()
    return path1
end

pathobjs = Object(1:100,(args...)->path(:stroke))
act!(obj,Action(1:100,follow_path(path(:path)[1],closed=false)))
render(video,pathname="test.gif")
run(`mpv test.gif`)

  1. Julia Version (i.e. output of julia -v):julia version 1.8.0

  2. Operating system (Mac, Linux, Windows):linux

  3. Javis version (i.e output of ] status Javis in the REPL):0.9

  4. Minimum working code example that led to bug: pasted above

Expected Behavior and Actual Behavior square should move along the arc in the picture , however it does not

Screenshots
If applicable, add your gif or drawing to help explain your problem.

test

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions