Darwinbots Forum
Bots and Simulations => Bot Tavern => Topic started by: spike43884 on April 07, 2016, 12:31:09 PM
-
I want to use some trigonometry in one of my bots, but I'm not familiar with radians. Plus I've not used db in ages.
So i'll outline my usage below:
3 bots connected via 2 ties in a line going bot A, bot B, bot C.
Bot (A) see's an enemy and gives info about which direction from itself the enemy is, and how far away.
Bot (B) receives this info, and performs a trigonometric calculation to fire at the enemy (without using eyes :D). It then gives information about which direction from itself the enemy is, and how far away.
Bot (C) receives bot B's info and performs a trigonometric calculation to fire at the enemy (without using eyes :D).
-
I want to use some trigonometry in one of my bots, but I'm not familiar with radians.
Start here (https://www.google.com/search?q=degrees+to+radians&oq=degrees+to+radians&aqs=chrome..69i57j69i64j0l4.5255j0j7&sourceid=chrome&ie=UTF-8), then read this (http://wiki.darwinbots.com/w/.aimdx). DB angles are radians * 200 basically.
-
I want to use some trigonometry in one of my bots, but I'm not familiar with radians.
Start here (https://www.google.com/search?q=degrees+to+radians&oq=degrees+to+radians&aqs=chrome..69i57j69i64j0l4.5255j0j7&sourceid=chrome&ie=UTF-8), then read this (http://wiki.darwinbots.com/w/.aimdx). DB angles are radians * 200 basically.
The length of a tie and the method of telling how far away something is in an eye is the same as well right?
-
Distances in eyes are somewhat complicated. The article on eyes (http://wiki.darwinbots.com/w/Eye) has a section on it.
Then length of a tie is also complicated. For multibots, your best bet is to get the two bots approximately the right distance, form the tie, wait for it to harden, then set the stiffness to 100.
-
Distances in eyes are somewhat complicated. The article on eyes (http://wiki.darwinbots.com/w/Eye) has a section on it.
Then length of a tie is also complicated. For multibots, your best bet is to get the two bots approximately the right distance, form the tie, wait for it to harden, then set the stiffness to 100.
I noticed .tielen isn't in the ties sysvar section.
Has it become deprecated? (I rather liked .tielen & .tieang)
I might hold off till one of DB2's successors comes out for using trigonometry then, hopefully some more -universal- distance telling will evolve then...
-
.tielen (http://wiki.darwinbots.com/w/.tielen).
-
.tielen (http://wiki.darwinbots.com/w/.tielen).
Yeah look on the sysvar page tie commands subsection.
It doesn't list tielen
-
yea sometimes you just need the full sysvar page to find it. it's not under the ties subsection but in the multibot subsection
-
yea sometimes you just need the full sysvar page to find it. it's not under the ties subsection but in the multibot subsection
To be honest, the multibot subsection only makes sense for the .multi command, which with only that command not being suitable for a tie subsection, it would be more sensible to create a .miscellaneous subsection which could also contain .pain or other 'unique' uses.