var params_a := GeomOpsParams3D.new()
params_a.shape = ...
params_a.transform = ...
var params_b := GeomOpsParams3D.new()
params_b.shape = ...
params_b.transform = ...
var result := GeomOpsResult3D.new()
if GeomOps3D.closest_to_shape(params_a, params_b, result):
print(result.point_a)
print(result.point_b)
if GeomOps3D.closest_to_point(params_a, point, result):
...var collision_shape_a: CollisionShape3D = ...
var collision_shape_b: CollisionShape3D = ...
var result := GeomOpsResult3D.new()
if GeomOps3D.node_closest_to_shape(collision_shape_a, collision_shape_b, result):
print(result.point_a)
print(result.point_b)
if GeomOps3D.node_closest_to_point(collision_shape_a, point, result):
...git clone --recurse-submodules https://github.com/gdpit/godot-geomops.git
cd godot-geomopsIf you already cloned:
git submodule update --init --recursiveRun this in a terminal using the same Godot version you target:
godot.exe --dump-extension-apiThis will generate extension_api.json in the current working directory.
Move extension_api.json into the root of the repository folder godot-geomops/.
python -m venv venvActivate it:
venv\Scripts\activatepip install sconscd godot-cpp
scons platform=<platform> custom_api_file=../extension_api.json
cd ..scons platform=<platform>