当前位置:网站首页>Esmini longspeedaction modification

Esmini longspeedaction modification

2022-07-05 07:35:00 sukhoi27smk

esmini Of LongSpeedAction, If shape Set to step Words ,DynamicsDimension Actually, it is invalid ,

because step It means setting directly , stay LongSpeedAction Of Start The process is over after setting ,Step It's not there

perform .

If we were step Under the circumstances , Want to make LongSpeedAction Last for a period of time before ending , It can be modified like this .

stay Start Removing the OSCAction::End()

    if (transition_dynamics_.shape_ == DynamicsShape::STEP)
	{
		object_->SetSpeed(target_->GetValue());
		if (!(target_->type_ == Target::TargetType::RELATIVE && ((TargetRelative*)target_)->continuous_ == true))
		{
			//OSCAction::End();
		}
	}

stay Step Add this sentence to

    if (transition_dynamics_.shape_ == DynamicsShape::STEP && transition_dynamics_.dimension_ == DynamicsDimension::TIME)
	{
		elapsed_ += dt;
		if (elapsed_ >= transition_dynamics_.target_value_)
			OSCAction::End();
		return;
	}

原网站

版权声明
本文为[sukhoi27smk]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140553428194.html