<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">James,<div class="">Your world is interesting… When I built a project myself, before looking at your world, I did it with a do-together and the two moves (bunny and chicken) inside the block. Both moves had the same duration. When I ran it the chicken moved, and the bunny moved along an arc, chasing the chicken, what I assume to be the original distance of the chicken to the bunny. This made some sense to me, as the calculation of the distance in the function would be a one-time occurrence, but the concurrent moves would force some adjustment of the bunny’s path.</div><div class=""><br class=""></div><div class="">However, still in my world, when I adjusted the duration of the chicken move in the do-together, I saw exactly the same behavior as you illustrate in your example. An event, as I am sure you know, executes concurrently with whatever is in my first method; so our projects are very similar. The different duration periods certainly affects the behavior, but I will leave it to the support team to figure that out / explain it.</div><div class=""><br class=""></div><div class="">As a work around I did find that if I modified your bunny move event by adding a </div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>while (distance to bunny > 0.01)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">               </span>bunny move (bunny distance to chicken) toward chicken (style abruptly)</div><div class=""><br class=""></div><div class="">I got the behavior that I think you were looking for…</div><div class=""><br class=""></div><div class="">Thank you for pointing this out.</div><div class=""><br class=""></div><div class="">All the best,</div><div class="">Don Slater</div><div class=""><br class=""></div><div class="">Alice Project<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 4, 2019, at 1:26 PM, Vanderhyde, James <<a href="mailto:vanderhyde@sxu.edu" class="">vanderhyde@sxu.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">

<div class="">
<div class="" style="word-wrap:break-word; line-break:after-white-space">I am experiencing what I think is a bug in Alice 2 in the “move toward” instruction. See attachment. Here is the code:
<div class=""><span class="" style="font-size: inherit; background-color: rgb(255, 247, 230);">  </span><span class="" style="background-color:rgb(240,240,255)"><b class="">bunny</b></span><span class="" style="font-size: inherit; background-color: rgb(255, 247, 230);"> </span><b class="" style="background-color:rgb(255,247,230)">move </b><span class="" style="font-size: inherit; background-color: rgb(255, 247, 230);">( </span><span class="" style="background-color:rgb(240,240,255)"><b class="">bunny</b></span><span class="" style="font-size: inherit; background-color: rgb(255, 247, 230);"> </span><b class="" style="background-color:rgb(255,247,230)">distance
 to </b><span class="" style="font-size: inherit; background-color: rgb(255, 247, 230);"></span><span class="" style="background-color:rgb(240,240,255)"><b class="">chicken</b></span><span class="" style="font-size: inherit; background-color: rgb(255, 247, 230);"> ) </span><b class="" style="background-color:rgb(255,247,230)">toward </b><span class="" style="font-size: inherit; background-color: rgb(255, 247, 230);"></span><span class="" style="background-color:rgb(240,240,255)">target
 = <b class="">chicken</b></span></div>
<div class="">
<div class="">
<div dir="auto" class="" style="word-wrap:break-word; line-break:after-white-space">
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
This should move the bunny right onto the chicken, and it does, unless the chicken is moving. When the chicken is moving, even if it’s moving very slowly, the bunny does not move far enough. It should do the same thing as “bunny move to chicken,” but it doesn’t.</div>
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
<br class="">
</div>
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
I am guessing there is special logic in the implementation of “move toward” for when the target object is moving, and there is an error in the calculation in that case. I am guessing maybe a unit vector is used instead of a vector scaled by the speed.</div>
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
<br class="">
</div>
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
James</div>
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
—<br class="">
James Vanderhyde<br class="">
Assistant Professor and Department Chair, Computer Science<br class="">
Saint Xavier University<br class="">
3700 W. 103rd St.<br class="">
Chicago, IL 60655<br class="">
773-298-3454</div>
</div>
</div>
</div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class=""></div>
</div>
</div>

<span id="cid:E326114A4CCC9A47A982247D820636D9@namprd06.prod.outlook.com"><bunny move toward chicken.a2w></span>_______________________________________________<br class="">alice-teachers mailing list<br class=""><a href="mailto:alice-teachers@lists.andrew.cmu.edu" class="">alice-teachers@lists.andrew.cmu.edu</a><br class="">To change settings or unsubscribe visit:<br class="">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</div></blockquote></div><br class=""></div></body></html>