Jump to content

Spline Pauses at each Frame


photo

Recommended Posts

Hello,

 

I have create 2 WorldTransforms manually.

1) The first spline, is generated with frames spaced 1 time unit apart.

2) The second spline, is the same spline, but the timing between each frame has been adjusted to be proportional to the arc length between the two frames.

 

When I play the transform (1), it moves along the path correctly and smoothly.

When I play the transform (2), it pauses regularly. It looks as if it is pausing on each of the frames I've added.

 

I've attached both of the exported .spline file in a .zip.

You can see this effect by attaching a node to the transform, and playing it.

 

post-36-0-77996400-1312997416_thumb.png

 

Here's a screenshot outputting all 30 frames' time and position of (2)

Spline (1) should have the same positions, but the time values will be 1, 2, 3, ... 30

 

 

 

 

Michael

sin.zip

Link to comment

Bug

 

Above described behaviour is caused by wrong parentheses in engine\framework\Spline.cpp, line 205

float Spline::get_frames(float time,int loop,int &frame_0,int &frame_1) const {
....
return saturate(time - time_0) / (time_1 - time_0);
}

 

Fix

 

float Spline::get_frames(float time,int loop,int &frame_0,int &frame_1) const {
....
return saturate( (time - time_0) / (time_1 - time_0) );
}

 

@Michael: Temporary work-around until fixed might be keeping maximum time delta between spline frames <= 1.0

Link to comment

Thanks again Ulf! I hope they see this in time to add to next release!

 

 

EDIT: Oh, whatdya know.. the release came out a few days ago. Does this mean I have to wait a month+ for this bug to be fixed?

Link to comment

Try the work-around by increasing spline frame count to keep time delta between frame below 1.0

 

Good idea Ulf, I will be doing that in the meantime.

Link to comment
×
×
  • Create New...