I am in the process of updating my app to use the most current stable release.
I have come across an issue with creating a blend from animations that are shorter than the blend time.
I have tracked it down to a new line in the AnimChannel Class
public void setAnim(String name, float blendTime){
if (name == null)
throw new IllegalArgumentException("name cannot be null");
if (blendTime < 0f)
throw new IllegalArgumentException("blendTime cannot be less than zero");
Animation anim = control.animationMap.get(name);
if (anim == null)
throw new IllegalArgumentException("Cannot find animation named: '"+name+"'");
control.notifyAnimChange(this, name);
if (animation != null && blendTime > 0f){
this.blendTime = blendTime;
// activate blending
blendTime = Math.min(blendTime, anim.getLength() / speed); <----------This has been added.
blendFrom = animation;
timeBlendFrom = time;
speedBlendFrom = speed;
loopModeBlendFrom = loopMode;
blendAmount = 0f;
blendRate = 1f / blendTime;
}else{
blendFrom = null;
}
animation = anim;
time = 0;
speed = 1f;
loopMode = LoopMode.Loop;
notified = false;
}
What I currently have implemented in my app is the function to choose a pose or a longer animation and then adjust the time it takes to create that animation. With the newly added line this truncates the animation to the shortest duration of the 2 so if I want to have the animation take a longer time this is no longer possible.
My question is there another way to what I am attempting or will I need to build a custom build of JME3 to do what have I have been doing currently?
Thank you for your time
Dustin