Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I want to set up a vegetation spawning system for imported static 3d terrains. Using ccbCloneSceneNode and setting up random positions and rotations for the vegation models. Does anyone have an action or a .ccb file they can help me with??? |
||||
|
I've tried to use the "sm node spawner" and "bsg spawn" but have had trouble getting the meshes to stay in the game once the root spawner is disabled, there has to be a way to remove them from their root all at once so that they can be in game at runtime and have collision enabled. |
||||
|
??? This is onceforloops, onceforloops2, onceforloops3 all the same person, forgot my password:( |
||||
|
At weekend if i have time i can make script for that if you havent found solution already. |
||||
|
Yeah I might need your help...That would excellent, thx:) |
||||
|
@sven, please help if you can... |
||||
|
Here is script i made -example project included. https://drive.google.com/file/d/... I included .bmp file with INFO so make sure to read it if you dont understand the usage of script. If script is not what you was talking about then let me know and i make new script or edit it if needed. (this script is not fully tested because i made it very fast- so let me know if you have problems with it.) |
||||
|
Thanks @sven, really cool you could that for me and others in the community. It feels good to bring request up on this forum, and have the code written by a good programmer like you so others can use it too. I think it is a very useful action:) |
||||
|
wrote: Thanks @sven, really cool you could that for me and others in the community. It feels good to bring request up on this forum, and have the code written by a good programmer like you so others can use it too. I think it is a very useful action:) I am glad you find it useful. NB i forgot to add random rotation.. just edit the script and replace this line.. ccbSetSceneNodeProperty(SRND_M[this.ID].node[i], "Rotation", 0, 90, 0); with.. ccbSetSceneNodeProperty(SRND_M[this.ID].node[i], "Rotation", 0, rndrotationy, 0); in file in your script folder.. Filename : action_SRND.js i cant use code tag -dont know whats wrong with this forum. [code] |
|