Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Does anyone know how to make a random terrain generation using cube meshes? If so, please let me know! |
||||
|
i need a reply |
||||
|
Anyone? |
||||
|
Already answered a similar question asked here https://www.ambiera.com/forum.ph... hope this helps |
||||
|
hi is to late? |
||||
|
Harol wrote: hi is to late? No it's just a 4 years old))) |
||||
|
Oh, thats super easy. You just need to use a 3rd party API like: https://www.randomnumberapi.com/api/v1.0/random?min=100&max=1000&count=1 So you simply execute http call using ccbDoHTTPRequest, and get the value inside the callback function. Since you're receiving a string which contains an array, you need to deserialize it first. If you only need one value, get the first element.
It's the most efficient and straight forward way of doing it. 100%. |
||||
|
You can actually get a random number from 0 to 10 using the following code: Math.round((new Date().getMilliseconds()) / 100) |
||||
|
There is actually a full article on that: https://svijaykoushik.github.io/.... Nice. |
|