Jump to content

How do I rotate road and or extrusion to be perpendicular to Ground


LDMONTY007

Recommended Posts

I am developing a High-Speed racing game. For players to navigate turns without having to get significantly good at controlling, I am trying to rotate parts of a spline so that it will curve upwards and be perpendicular to the road during the turn. I can't find a way to do this and wondered if I could get help.

Link to comment
Share on other sites

I have realized that I also need to do more than just rotation, I may end up coding a quick spline extension that creates two side by side splines and links them using geometry kind of like the extrusion tool but replacing the graph with actual splines. It'll give me more control over the actual shape but I would still like to know if I can rotate individual spline segments in the mean time.

Link to comment
Share on other sites

As an update, I was coding my custom spline extension for roads and there is a node property called "Roll" for spline nodes, I am able to set it in code and it rotates the spline nodes but I can't quite figure out how to do it in the editor. You can't use the rotate tool so I will need to see if there is a way I can make a custom gizmo for editing roll or at least it would be nice if someone on here could answer this question and let me know how to edit roll in the editor without using code.

Link to comment
Share on other sites

Another update: I implemented a rotation handle in the editor for each node so you can rotate the Z axis of any spline including roads and extrusions (I haven't tried it on the rivers) and it modifies the roll and saves it. So now I can have really wavy/curvy roads for my racing game. I wish I could have had some help with this instead of having to code it myself—kind of disappointing. I was wondering if am I allowed to upload my version of the editor script to GitHub so others who have this tool can use the rotation? I assume not. Please let me know.

  • Like 1
Link to comment
Share on other sites

If you posted in the GeNa forum, you would be more likely to get an answer. I will move this post.

 

Link to comment
Share on other sites

  • 6 months later...

I apologize for taking so long to respond as I've been attending university. I will have to open the project up and share the script on GitHub when I get a chance. 

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

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