alice-teacher Alice 2.5.4 error

aik min aik_min at yahoo.com
Thu Sep 13 08:36:17 EDT 2018


Hello Chris,
Alice 2.5 is behaving differently, but not because there was a bug, but the math was actually fixed. moveAwayFrom() will move the subject away from the target (in the opposite direction). It does not have anything to do with the object's orientation. The issue with your example here is the objects are all on top of each other, thus the moveAwayFrom method move the skater away in direction of its previous location. If you space the objects 1m apart, you will see what Alice is doing (It does not matter what direction the Skater is facing).

In fixing the Math, I may have introduced this strange behavior. In reality, moving away from an object is like playing eagle and chicken. The chicken always try to run in the opposite direction from the eagle (when the eagle is flying around). In the previous implementation, the direction and amount is calculated only in the beginning. The subject is then moved in the pre-calculated orientation, regardless of where the target is moving to. In another word, the two may end up in the same location if the target is moving towards the subject twice as fast. 

Let me know if this makes sense, if you disagree to this implementation. Suggestion are welcomed. Thanks.

Aik Min Choong 


    On Thursday, September 6, 2018, 6:50:12 PM GMT+8, Romero, Chris <Chris-Romero at Redwoods.edu> wrote:  
 
 Hello,

There may be an issue with the moveAwayFrom() method. I have been using a tutorial from Dick Baldwin for years without issue. However, the latest version of Alice 2.5.4 does not handle the program as was done in all previous versions of Alice 2. 

I have attached the alice world (v2.4.3.a2w) from version 2.4.3 along with a screen shot of what the final scene should look like (v2.4.3_final_scene_shot.png) and the screen shot from what happens when the same code is executed in v2.5.4 (v2.5.4_final_scene_shot.png).

If the moveAwayFrom() commands are replaced with move(backwards) commands, all is good in the final resulting scene.

Please advise,
Chris

Chris Romero MSCIT, BSEE
Professor CIS
College of the Redwoods
(707) 476-4366
_______________________________________________
alice-teachers mailing list
alice-teachers at lists.andrew.cmu.edu
To change settings or unsubscribe visit:
https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20180913/2cf11eee/attachment.html>


More information about the alice-teachers mailing list