mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:23:33 +02:00
A couple explanatory comments.
This commit is contained in:
parent
dd5d3c5591
commit
d3e5e3ccf1
1 changed files with 2 additions and 0 deletions
|
@ -1689,6 +1689,7 @@ void AnimationHandle::simulate(float deltaTime) {
|
||||||
}
|
}
|
||||||
int ceilFrameIndex = (int)glm::ceil(_frameIndex);
|
int ceilFrameIndex = (int)glm::ceil(_frameIndex);
|
||||||
if (!_loop && ceilFrameIndex >= animationGeometry.animationFrames.size()) {
|
if (!_loop && ceilFrameIndex >= animationGeometry.animationFrames.size()) {
|
||||||
|
// passed the end; apply the last frame
|
||||||
const FBXAnimationFrame& frame = animationGeometry.animationFrames.last();
|
const FBXAnimationFrame& frame = animationGeometry.animationFrames.last();
|
||||||
for (int i = 0; i < _jointMappings.size(); i++) {
|
for (int i = 0; i < _jointMappings.size(); i++) {
|
||||||
int mapping = _jointMappings.at(i);
|
int mapping = _jointMappings.at(i);
|
||||||
|
@ -1699,6 +1700,7 @@ void AnimationHandle::simulate(float deltaTime) {
|
||||||
stop();
|
stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// blend between the closest two frames
|
||||||
const FBXAnimationFrame& ceilFrame = animationGeometry.animationFrames.at(
|
const FBXAnimationFrame& ceilFrame = animationGeometry.animationFrames.at(
|
||||||
ceilFrameIndex % animationGeometry.animationFrames.size());
|
ceilFrameIndex % animationGeometry.animationFrames.size());
|
||||||
const FBXAnimationFrame& floorFrame = animationGeometry.animationFrames.at(
|
const FBXAnimationFrame& floorFrame = animationGeometry.animationFrames.at(
|
||||||
|
|
Loading…
Reference in a new issue