DarwinBotsManual
Open the app EspañolES

.hitdn

It is 1 in the cycle after a collision from behind, with something the bot had at its back.

Facts

Address
206
Name
.hitdn
Kind
Sense: the engine writes it for the DNA to read
Group
Collisions and hits
Written by
The engine, in the forces and collisions phase: 1 if what it touches is behind, within about 45 degrees of the direction opposite to its heading. You read it in the next cycle.
Cleared
The engine, when the senses are cleared, right after your DNA.
Range
0 or 1.
Mutations
picked as a read (*)

.hitdn turns on when the bot collides with something behind it: the center of the other one falls inside a cone of about 45 degrees on each side of the direction opposite to its heading (.aim). It is the direction of .hit opposite to .hitup; the other two are .hitdx and .hitsx.

Like all touch, the engine writes it in the physics step and your DNA reads it in the next cycle, only once.

It is the typical “something caught me from behind” alert, where the eyes do not reach. The classic response is to turn around to look at it:

cond
*.hitdn 0 !=
start
628 .aimsx store
stop

A half turn is 628. In the cycle after the turn, the bot has it in front and can see it with .eye5.