I've been attempting to build a custom landing gear. Issue is, part of it needs to rotate partway through the cycle.
As far as I can tell, in theory
GearDown ? (ceil(smooth(LandingGear,0.5))) : (floor(smooth(LandingGear,0.5)))
Should handle this. If true, as in when activated it will behave as the gear arm and wait a moment before going to 1 (activating). When changed to false, it should behave as the door and once again take a moment to go to 0.
Instead it acts as though it was LandingGear or GearDown alone, with nothing else.
What am I missing?
@hpgbproductions I don't follow.
I am going to assume you're an animator because treating it as an animation is meaningless when I'm not one.
It is easiest to make landing gear FT by treating it as an animation, and planning it using an animation timeline. Then, you can use linear mapping or math functions.
@Subsere
Consider an unrelated example:
Activate1 ? smooth(Activate2,0.5) : smooth(Activate2,0.5)
.
The value of this expression starts as -1, as both activation groups are off. If you toggle Activate1 on and off, the value stays as -1. Note that when Activate1 is off, the expression evaluates the second smooth function, and when Activate1 is on, the first smooth function is evaluated.
.
Without restarting the simulation, turn on Activate2 and wait until the expression has the value 1. Then, turn off Activate1 and the value will jump to -1, and increase towards 1. This means that while the second smooth function was running, the first smooth function remained constant at its previous value of -1. It only updated when it was chosen.
.
This behavior is very unintuitive and difficult to track down, so you should never use smooth (or sum) in places where their updates can be suspended.
@hpgbproductions I don't follow?
be careful of using smooth in branches, smooth only updates when it is called, so the value in the other branch won't update
@Subsere i was want to help but i wasnt understand the question .
also when i see, you was already solved it
@Subsere fine
@JSTQ I already achieved it with round()
@Subsere What effect do you ultimately want
@Subsere … interchanging… Wait for me for a moment
@JSTQ I had tried interchanging GearDown and LandingGear. I don't believe the result was any different.
@Subsere … Have you tested it separately? Your problem is not because two equations are strung together, but because the output value is problematic, even if there is only one of them, it is still the same.
It's quite troublesome for you to change this problem, but now you have two variables in your hand: LandingGear and GearDown, which correspond to four different situations. Then you can change the judgment from the GearDown variable to two variables, corresponding to the situations you want.
@JSTQ None of what you said made any sense whatsoever.
Please rephrase.
The problem is obvious, it's that your numerical value is incorrect. LandingGear only has 0 and 1 two numbers. I suggest you add a judgment on the LandingGear value to determine whether to release or retract the landing gear
So whats wrong
@griges The pain of being Silver.
noone helped lol
good one tho
Aight, figured it out.
The gear, not why the original method didn't work.
round() appears to hold a solution, though I'm still not sure why my original solution did not function as expected.
Altered the title and text to reflect my current issue.
I cannot determine conclusively whether or not Input accepts true/false
New problem, differing timing on retracting and extending.
The secret ingredient is lying