Jump to content

Stick prefabs on a spline, equal distance apart (and also random distance)

Go to solution Solved by Peter,

Recommended Posts

Hi Guys


I saw a video a while back, where there was a farm field, and objects was being dropped on the terrain in the farm field on a spline, to form rows of planted stuff. Can't remember where I saw the video.


Anyway.... Can I do that with Gena Pro? Take my tree prefab(s) and drop them on a spline, equal distance apart? And on a different spline, random distance apart?


Link to comment
Share on other sites

  • Solution

@newguy123 yes, this can be done - Gena Pro has a spline system that allows you to run a spawner along the spline so you can place objects along it. There are options for a throw distance which would allow for randomization in positioning. You can see this in action here around 18:00 where we add rocks to a riverbed:

Note that you can also texture or spawn trees / grass along the spline, and build complete road and river meshes. 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Hi there @gogo,

There actually is a demo of how to use the Spline in the Asset Samples/Script Examples folder. If you look at the GeNaRuntimeExample.cs script, you can see a function called "SplineSpawn" that actually performs a spawn at runtime. 

The reason why 'Execute' doesn't work is because Execute is a method that simply 'Updates' the Spline and all of it's Extensions. This function isn't really intended for public use. Instead, the concept is to get a reference to the Spawner Extension on the Spline (using the example above) and calling methods on it at runtime. 🙂

Hope this helps!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

  • Create New...