Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to check if an object is on the way between bot and destination #1676

Open
Zemogiter opened this issue May 18, 2024 · 1 comment
Open

Comments

@Zemogiter
Copy link

Unless there's a undocumented function somewhere, I don't see a way to do it in CBot. The closest thing I came up with is this:

point midPoint;
midPoint.x = ((position.x + pos.x) / 2);
midPoint.y = ((position.y + pos.y) / 2);
midPoint.z = ((position.z + pos.z) / 2);
goto(midPoint);

Which is a point between bot (position) and destination (pos).
What I'm trying to do is write a program that tells the bot to go to a point while following a path of Power Captors.

@hexagonrecursion
Copy link
Contributor

I don't understand. Are you asking to add a new function-like instruction? What do you want the inputs to be? What do you want the return value to be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants