### Author Topic: Evenly Distance affects Y rotation?  (Read 1924 times)

#### satoer

• Newbie
• Posts: 20
##### Evenly Distance affects Y rotation?
« on: December 10, 2014, 09:06:38 PM »
I’m trying to create a carriage following a rail. Like a roller-coaster. I do not want the carriage to deform, but it needs to follow the spline. The weird thing is that some individual carriages on some positions rotate on the Y axis.

After a lot of experimenting, I’ve narrowed the problem down to the Evenly Distance. If I set this to 0 or a low value, all carriages are following the spline as intended. But if I crank up this value the carriages began to misbehave.

Also if I leave the Evenly Distance to 0 and Crank up the segment Padding the same misbehaviour occurs.

A dirty solution I’ve hacked is to put the carriage segment into a Sequence, fill the other slot of the sequence with a empty segment and increment the empty slot counter to space out the distance between carriages. But this is probably not the best solution.

So, why does the evenly distance value affects the Y rotation?
« Last Edit: December 10, 2014, 09:24:57 PM by satoer »

#### Paul Roberts

• iToo Software
• Hero Member
• Posts: 1785
##### Re: Evenly Distance affects Y rotation?
« Reply #1 on: December 11, 2014, 11:58:12 AM »
Hi,

This problem can occur when using a generator with evenly segments but no default. Each segment added to the array effectively acts as an interpolation step used to calculate the banking, so the more segments, the smoother the interpolation. When using only evenly segments, the interpolations steps are few and far between resulting in a rougher and less accurate result.

To fix it you can use segments in the default input instead of evenly then use padding to create the spacing; rework the style to combine default and evenly segments into a single generator; or alternatively include some non-rendering segments in the default input. This could be simple geometry assigned with an invisible material, or an object with vertices but no faces. Ideally we should be able to use an empty segment but it doesn't currently work with this set up. We are looking into this and hopefully it will be fixed in a future update.

I hope that helps.

Many thanks,

Paul
« Last Edit: December 11, 2014, 01:39:00 PM by Paul Roberts »
Paul Roberts
iToo Software

#### satoer

• Newbie
• Posts: 20
##### Re: Evenly Distance affects Y rotation?
« Reply #2 on: December 11, 2014, 01:08:19 PM »
Hi Paul,