ScripCanvas

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-25 16:40:27 -07:00
committed by Esteban Papp
parent 2943f16d11
commit b52516cdec
8 changed files with 11 additions and 11 deletions
@@ -92,7 +92,7 @@ namespace ScriptCanvas
AZ_INLINE AABBType FromCenterRadius(const Vector3Type center, const NumberType radius)
{
return AABBType::CreateCenterRadius(center, radius);
return AABBType::CreateCenterRadius(center, static_cast<float>(radius));
}
SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(FromCenterRadius, k_categoryName, "{5FEFD1BF-DC5B-4AFA-892F-082D92492548}", "returns the AABB with Min = Center - Vector3(radius, radius, radius), Max = Center + Vector3(radius, radius, radius)", "Center", "Radius");
@@ -55,7 +55,7 @@ namespace ScriptCanvas
AZ_INLINE TransformType FromScale(NumberType scale)
{
return TransformType::CreateUniformScale(scale);
return TransformType::CreateUniformScale(static_cast<float>(scale));
}
SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(FromScale, k_categoryName, "{4B6454BC-015C-41BB-9C78-34ADBCF70187}", "returns a transform which applies the specified uniform Scale, but no rotation or translation", "Scale");
@@ -143,7 +143,7 @@ namespace ScriptCanvas
AZ_INLINE TransformType MultiplyByUniformScale(TransformType source, NumberType scale)
{
source.MultiplyByUniformScale(scale);
source.MultiplyByUniformScale(static_cast<float>(scale));
return source;
}
SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(MultiplyByUniformScale, k_categoryName, "{90472D62-65A8-40C1-AB08-FA66D793F689}", "returns Source multiplied uniformly by Scale", "Source", "Scale");
@@ -114,7 +114,7 @@ namespace ScriptCanvas::Nodeables::Spawning
AZ::Vector3 rotationCopy = rotation;
AZ::Quaternion rotationQuat = AZ::Quaternion::CreateFromEulerAnglesDegrees(rotationCopy);
entityTransform->SetWorldTM(AZ::Transform(translation, rotationQuat, scale));
entityTransform->SetWorldTM(AZ::Transform(translation, rotationQuat, static_cast<float>(scale)));
}
};
@@ -82,12 +82,12 @@ namespace ScriptCanvas
void DelayNodeable::Reset(Data::NumberType countdownSeconds, Data::BooleanType looping, Data::NumberType holdTime)
{
InitiateCountdown(true, countdownSeconds, looping, holdTime);
InitiateCountdown(true, static_cast<float>(countdownSeconds), looping, static_cast<float>(holdTime));
}
void DelayNodeable::Start(Data::NumberType countdownSeconds, Data::BooleanType looping, Data::NumberType holdTime)
{
InitiateCountdown(false, countdownSeconds, looping, holdTime);
InitiateCountdown(false, static_cast<float>(countdownSeconds), looping, static_cast<float>(holdTime));
}
}
}
@@ -47,7 +47,7 @@ namespace ScriptCanvas
void DurationNodeable::Start(Data::NumberType duration)
{
m_elapsedTime = 0.0f;
m_duration = duration;
m_duration = static_cast<float>(duration);
AZ::TickBus::Handler::BusConnect();
}
}