This:
mSlipAngle = FMath::Atan2(mLocalVelocity.Y, absForwardVelocity)
Instead of:
mSlipAngle = FMath::Atan(mLocalVelocity.Y / (absForwardVelocity + FGearUtility::epsilon));
This:
mSlipAngle = FMath::Atan2(mLocalVelocity.Y, absForwardVelocity)
Instead of:
mSlipAngle = FMath::Atan(mLocalVelocity.Y / (absForwardVelocity + FGearUtility::epsilon));
bool isAccel = (mAccel - aOldAccel) > 0.01f;
aOldAccel = FMath::Lerp(aOldAccel, mAccel, 0.2f);
debug = isAccel ? 222.0f : 0.0f;
If Throttle goes up = 222.0, if stays/down = 0.0f
Added "0.01f;" as tolerance in bool or not works.
#UnrealEngine #Gamedev #Indiedev
bool isAccel = (mAccel - aOldAccel) > 0.01f;
aOldAccel = FMath::Lerp(aOldAccel, mAccel, 0.2f);
debug = isAccel ? 222.0f : 0.0f;
If Throttle goes up = 222.0, if stays/down = 0.0f
Added "0.01f;" as tolerance in bool or not works.
#UnrealEngine #Gamedev #Indiedev
(the suggestion here will never return a negative for the sign, even if the input is negative)
(the suggestion here will never return a negative for the sign, even if the input is negative)
FMath::Pow(mTargetSteeringInput, 2) * FMath::Sign(mTargetSteeringInput)
But, Is the correct way? Better alternatives?
#UnrealEngine #UE5 #Gamedev #Indiedev
FMath::Pow(mTargetSteeringInput, 2) * FMath::Sign(mTargetSteeringInput)
But, Is the correct way? Better alternatives?
#UnrealEngine #UE5 #Gamedev #Indiedev
mTargetSteeringInput * FMath::Abs(mTargetSteeringInput)
Guess is the best way now? If anything better, let me know.
Credits to @xblasco.bsky.social
FMath::Pow(mTargetSteeringInput, 2) * FMath::Sign(mTargetSteeringInput)
But, Is the correct way? Better alternatives?
#UnrealEngine #UE5 #Gamedev #Indiedev
mTargetSteeringInput * FMath::Abs(mTargetSteeringInput)
Guess is the best way now? If anything better, let me know.
Credits to @xblasco.bsky.social
The refactored version works, formula clamps to 0-1 but gives slighty different results, but cant find the problem.
frontShare = FMath::Max(0.0f, FMath::Min(1.0f, mTorqueShares[0] -lockRatio *(1.0f -(rearSpeed /frontSpeed )) *mTorqueShares[0]));
Any idea? #UE5 #Programming
The refactored version works, formula clamps to 0-1 but gives slighty different results, but cant find the problem.
frontShare = FMath::Max(0.0f, FMath::Min(1.0f, mTorqueShares[0] -lockRatio *(1.0f -(rearSpeed /frontSpeed )) *mTorqueShares[0]));
Any idea? #UE5 #Programming
(and in c++, it's FMath::GetReflectionVector)
(and in c++, it's FMath::GetReflectionVector)
NO ONE DOES THAT JUST DO FMATH::CROSS() LIKE A NORMAL PERSON
Oh wait you can't because you used a fuckin robot to guess at "correct" code, so its up to me to fix your fuckin shitty code
God. Hate this. No wonder all of this is illegible
Bitch, no, i want your human ass words. I want your words in order to save *all* of us time. I've been reading the code for hours already, fucker. Explain your work, you genai fuck.
NO ONE DOES THAT JUST DO FMATH::CROSS() LIKE A NORMAL PERSON
Oh wait you can't because you used a fuckin robot to guess at "correct" code, so its up to me to fix your fuckin shitty code
God. Hate this. No wonder all of this is illegible
Comparing floats in Unreal? Be careful — Value == 1.f might fail due to IEEE-754 imprecision.
✅ Use FMath::IsNearlyEqual() or IsNearlyZero()
🎨 In Blueprints? Use the “Nearly Equal” node.
#UnrealEngine #GameDev #CPP
Comparing floats in Unreal? Be careful — Value == 1.f might fail due to IEEE-754 imprecision.
✅ Use FMath::IsNearlyEqual() or IsNearlyZero()
🎨 In Blueprints? Use the “Nearly Equal” node.
#UnrealEngine #GameDev #CPP
I'm excited to launch this account dedicated to teaching Cambridge AS & A Level Mathematics (9709) and Further Mathematics (9231) for the 2026-2027 exams!
#manim #math #alevels #alevel #fmath #furthermath #furthermaths #mathematic #cambridge #trending
I'm excited to launch this account dedicated to teaching Cambridge AS & A Level Mathematics (9709) and Further Mathematics (9231) for the 2026-2027 exams!
#manim #math #alevels #alevel #fmath #furthermath #furthermaths #mathematic #cambridge #trending
#UE5 #gamedev #indiedev #code #cpp
#UE5 #gamedev #indiedev #code #cpp
my assumption for UE is:
mTargetSteeringInput * FMath::Abs(mTargetSteeringInput)
my assumption for UE is:
mTargetSteeringInput * FMath::Abs(mTargetSteeringInput)
What i have now:
-
bool isLngFrictionUp = (mLngFriction - aLastLngF) > 0.001f;
aLastLngF = FMath::Lerp(aLastLngF, mLngFriction, 0.1f);
float lerpLngF = isLngFrictionUp ? 1.0f : 2.0f;
-
What you think? Any optimization/correction?
What i have now:
-
bool isLngFrictionUp = (mLngFriction - aLastLngF) > 0.001f;
aLastLngF = FMath::Lerp(aLastLngF, mLngFriction, 0.1f);
float lerpLngF = isLngFrictionUp ? 1.0f : 2.0f;
-
What you think? Any optimization/correction?
Use the function that your engine gave you, or use an epsilon (nerd name for "a kinda small number).
Unity: Mathf.Approximately(a, b)
Unreal: FMath::IsNearlyEqual(a, b)
With an epsilon: abs(a - b) < 0.0001
Use the function that your engine gave you, or use an epsilon (nerd name for "a kinda small number).
Unity: Mathf.Approximately(a, b)
Unreal: FMath::IsNearlyEqual(a, b)
With an epsilon: abs(a - b) < 0.0001
This will make any Timeline of *any Length* play for the given Duration.
I prefer to then author my curves from 0-1.
#GameDev
github.com/BenVlodgi/UE...
This will make any Timeline of *any Length* play for the given Duration.
I prefer to then author my curves from 0-1.
#GameDev
github.com/BenVlodgi/UE...
It feels like this comment is pointing to some nontrivial missing steps. E.g. for expr node, dealing with an AST would probably be worse? To the extent that the proof of concept doesn't mean much.
It feels like this comment is pointing to some nontrivial missing steps. E.g. for expr node, dealing with an AST would probably be worse? To the extent that the proof of concept doesn't mean much.
Comparison A resolves to True
Comparison B resolves to False
They should both fail!
Comparison A resolves to True
Comparison B resolves to False
They should both fail!