GDevelop icon indicating copy to clipboard operation
GDevelop copied to clipboard

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

Open tristanbob opened this issue 4 years ago • 3 comments

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 avatar Apr 07 '22 20:04 tristanbob

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

image

Bouh avatar Apr 13 '22 08:04 Bouh

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

HarsimranVirk avatar Jun 04 '22 11:06 HarsimranVirk

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

tristanbob avatar Jun 04 '22 13:06 tristanbob