You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/jsbattle-docs/docs/manual/algorithms_aiming.md
+2
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ The same rule applies to the radar. Its rotation is also relative to the body (*
14
14
let radarAngle = Math.deg.normalize(90 - state.angle);
15
15
```
16
16
17
+
Notice that results are normalized. Learn more about it [here](./algorithms_geometry.md).
18
+
17
19
## Aim at the target angle
18
20
19
21
Once you know the angle where the tank should point its gun, we need to write a proper algorithm in `tank.loop(...)` to start to move it in the proper direction and stop when it is on the target. Two examples are shown here. In both cases, we will be pointing the gun at the north (`targetAngle = -90`).
0 commit comments