Hi, I try to figure out how to bring in a terrain using a height map using engine only.
I found this here: Terrain Generation from Heightmap | Learn PlayCanvas and try to adapt, it seems that the terrain script itself is working, but
how do I actually bring in the Terrain class to the root app?
@yaustar this is the code I am struggeling.
“this” is not available. I created the Terrain so far I guess now the final step is to add it
to app.root as a child, am I wrong?
Are you adding the script to an entity of yours in code? If you are just using the methods, then you need to create a new pc.Entity and add that to app.root.