Bots and Simulations > DNA - General

Setting a bots angle

(1/2) > >>

Testlund:
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?

Testlund:
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!


--- Code: ---'Movement debugger

cond
 *.hit
 *.reftype 1 =
start
 *.refxpos *.refypos angle .setaim store
 628 .aimright store
stop

--- End code ---

Testlund:
It's impossible to make a bot turn a half circle and swim backwards!  :banghead:

Botsareus:
By swim backwards do you mean something like 10 .dn store?

Botsareus:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version