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 "Distance between positions" and "Distance between object and position" condition #3815

Open
tristanbob opened this issue Apr 7, 2022 · 3 comments · May be fixed by #6738
Open

Add "Distance between positions" and "Distance between object and position" condition #3815

tristanbob opened this issue Apr 7, 2022 · 3 comments · May be fixed by #6738
Labels
✨ enhancement 👌good first issue Good issue if you want to start contributing to GDevelop

Comments

@tristanbob
Copy link
Contributor

tristanbob commented Apr 7, 2022

Description

Users may want to check the distance between two positions or between an object and a position. This can currently be done by using the "Compare two numbers" condition and using the "DistanceBetweenPositions()" and "Object.DistanceToPosition()" expressions.

It's important for "Distance between object and position" to be a condition because the "Compare two numbers" condition does not perform object picking.

These tasks would be easier if these new conditions were provided by GDevelop.

Solution suggested

  • Create a new "Distance between positions" condition that works similar to the existing condition "Distance between objects"
  • Create a new "Distance between object and position" condition that performs object picking
@tristanbob tristanbob changed the title Add "Distance between two positions" condition (similar to "Distance between two objects") Add "Distance between positions" condition (similar to "Distance between objects") Apr 7, 2022
@tristanbob tristanbob changed the title Add "Distance between positions" condition (similar to "Distance between objects") Add "Distance between positions" and "Distance between object and position" condition Apr 7, 2022
@Bouh
Copy link
Collaborator

Bouh commented Apr 13, 2022

You may have to iterate on the object first to be able to pick an instance.
compare_distance.zip

image

@4ian 4ian added the 👌good first issue Good issue if you want to start contributing to GDevelop label Apr 16, 2022
@HarsimranVirk
Copy link
Contributor

Is anybody working on this issue? I would like to take it up and re-familiarise myself with the codebase again 😄

@tristanbob
Copy link
Contributor Author

No one is working on this. Good luck and thank you! Let us know if you get stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement 👌good first issue Good issue if you want to start contributing to GDevelop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants