03-18-2016, 12:50 PM
tar2.position is of type point, which has 3 floats. You need to save it to a variable and calculate position:
You might want to use object's orientation (angle) to calculate position using cos() and sin().
Side note: goto() is kinda like cheating. It's too easy. Try doing the same using motor() and jet(). I think this could be a good idea for a programming challenge. A speed run or something.
Code:
point pos = tar2.position;
pos.x += something;
pos.y += something;
You might want to use object's orientation (angle) to calculate position using cos() and sin().
Side note: goto() is kinda like cheating. It's too easy. Try doing the same using motor() and jet(). I think this could be a good idea for a programming challenge. A speed run or something.
"After three days without programming, life becomes meaningless."
~The Tao of Programming
~The Tao of Programming