phase / PhaseBot

Stand-alone Minecraft bot with a turing complete scripting language (MC 1.8)
30 stars 4 forks source link

Move along an Arc #13

Open phase opened 9 years ago

phase commented 9 years ago

Here's some pseudocode I made for going to a point in an arc.

for t in [30, 45, 60, 90]: #More angles?
    rz = sin(to.z > from.z ? -t : t) * (to.z - from.z)
    rx = cos(to.x > from.x ? -t : t) * (to.x - from.x)
    ry = tan(to.y < from.y ? -t : t) * (to.y - from.y)
    move(rx, ry, rz)

Thoughts @VoltzLive?

j-walk commented 9 years ago

test it! ^^