Darwinbots Forum
Bots and Simulations => DNA - General => Topic started by: Testlund on December 04, 2013, 10:58:33 AM
-
Why do these two work exactly the same?
*.refxpos *.refypos angle .setaim store
*.refxpos *.refypos angle sub .setaim store
Shouldn't the latter change the bot to opposite direction?
-
There is something not right with the .hit sysvar. The code below will make a bot turn away from a shape when it SEES it!
'Movement debugger
cond
*.hit
*.reftype 1 =
start
*.refxpos *.refypos angle .setaim store
628 .aimright store
stop
-
It's impossible to make a bot turn a half circle and swim backwards! :banghead:
-
By swim backwards do you mean something like 10 .dn store?
-
If you want the robot to turn but still move in the same direction you have to memorize the angle and use sin cos commands.
-
"COS" is another thing I need to learn, but I've figured out a way for bots to handle shape. I'll upload a sim example soon. Going to check out 2.46C now.