Jump to content

Programming a first-person camera to follow a GeNa spline


Recommended Posts

I created a spline in gena that i used to carve a road in my terrain and now I want to use that spline as a path that my player will follow. Is there a way to do this? Thanks!!

Link to comment
Share on other sites

I havent tried this with GeNa Pro but we do have a tool for this called Pegasus. 
I would recommend taking a look at that tool. 

You could generate a spline but you would probably have to make a script to add to it so the camera would follow it. 
Otherwise, look into something like Pegasus. 


Link to comment
Share on other sites

@Bryan Interesting, I will check it out. The project that I am working on is an interactive exhibit for a museum where two players race against each other on bikes through a terrain. Will Peasus allow me to render two cameras simultaneously for split screen gameplay?

Also, will I be able to move the cameras along the path in realtime through user input/scripting? I need to move these cameras using two particular scenarios. One, the simplest way, using arrow keys (forward/backward) to increment/decrement the Path Position. Two, more complicated, but ultimately the way I actually need to do it is to move the camera dynamically along the path using an ever changing range of values (coming in through Arduinos), 0 to 10 for instance, to simulate speed.

Link to comment
Share on other sites

Have a look at the GeNaSpline API in the GeNa API docs. You could start with something very simple that traversed the nodes in your spline and use something like transform.lookAt() to point your player toward the current node, switching to the next node when you reach it. Your next iteration could use the GeNaCurve API to smooth the movement between nodes along the curve. You could use a lerp function to control the player speed between nodes using your 1-10 speed modifier.

Just a thought!

Link to comment
Share on other sites

That could work as well, if you are using two camera I would need to test this. 
Typically you would use the Unity timeline, but I thing that Unity has something for splitscreen. 
I would need to take a look at both options and see which would be the best and most performant. 

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...