-
Notifications
You must be signed in to change notification settings - Fork 140
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
Expose set_pixel and variants #258
Comments
There is an API. All of the get pixel variants take a global position. Why can't you use this? Terrain3D/src/terrain_3d_storage.cpp Lines 1091 to 1095 in c5a72b0
You just want a function that does the math of get_pixel without returning the pixel? But you can already write your own function for that as you have. Vec3 to vec2 image position is not useful without the region Id as well. Most people should use get_pixel. The reason you'd use the maps directly is if you want to use image.blit or fill. And in those cases you aren't recalculating the image position every pixel.
That's great, and exactly what you should be doing in both Terrain3D and Godot source when doing advanced gamedev projects. |
I'm not only want get_pixel, but also want set_pixel, so I need the true pixel of image. |
I can add set_pixel easily and see it as useful. |
Description
I want modify terrain when game runtime. but there was no a function for get the Image's pixel position with global_position.
Now I'm solved this problem by look at the Terrain3DEditor C++ code, but I wish can has api for GDScript.
Are you willing to help create this feature?
No
The text was updated successfully, but these errors were encountered: