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

Procgen terrain - script debugged but not working #409

Open
ShockBock opened this issue Nov 4, 2023 · 1 comment
Open

Procgen terrain - script debugged but not working #409

ShockBock opened this issue Nov 4, 2023 · 1 comment

Comments

@ShockBock
Copy link

Hi there, I would like to get HTerrain to generate a terrain at the point at which the game is loaded, i.e. (for now) when I press F5 to go into the debugger. I have copy-pasted the code at https://hterrain-plugin.readthedocs.io/en/latest/#procedural-generation into a script for the root Node3D, shown below:

HTerrain play

Side note, I changed:

splat = splat.linear_interpolate(Color(0,1,0,0), sand_amount)
splat = splat.linear_interpolate(Color(0,0,1,0), leaves_amount)

to:

splat = splat.lerp(Color(0,1,0,0), sand_amount)
splat = splat.lerp(Color(0,0,1,0), leaves_amount)

...to deal with an error message. I guess this is the result of the transition of Godot 3.x to 4.x?

Anyway, I provided filepaths to textures in the project folder and that dealt with any outstanding issues. However, when F5-ing into the debugger, I see no proc gen terrain.

I would be grateful for any help.

PS: I have no problems generating HTerrain in the editor.

@ShockBock
Copy link
Author

Wait! I think I solved it. I needed to have a HTerrrain node already in the tree (duh). Okay, I'll have a play and see where I go from here

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

1 participant