- Home /
Connecting two meshes.
I am trying to create a driving game where the road is completely random. I need to be able to add different road models to the current road during runtime to make it random. So, for starters, I have two road models already modeled - they each have three pieces - "Start", "Middle", and "End". My idea for connecting two meshes was to take the "End" piece of the first road, and instantiate the second road there - so I would basically be connecting the "Start" of Road2 to the "End" of Road1. This is not working however. Any help on how to do this properly?
Basically, how do I connect two meshes during runtime???
Answer by Berenger · Mar 10, 2012 at 06:16 PM
You can stay high level and not touch the meshes I guess. Maybe parent the road with an empty game object, make sure it's position is one the connect point, then you just have to move those parents, parentsA.position = parentA.position and they should snap nicely.
If you want to merge two meshes though, that more difficult. I'm not sure I can be of much help here.
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Modifying vertices values in a mesh 1 Answer
How use Streaming Assets and Handheld.PlayFullScreenMovie iOS? 1 Answer
Force iOS first person to move slightly when player is not moving it? 1 Answer
Mesh with two materials made by script 2 Answers