Profile image

FT code issues

2,186 Subsere  2 months ago

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?

  • Log in to leave a comment
  • Profile image
    2,186 Subsere

    @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.

    2 months ago
  • Profile image

    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.

    2 months ago
  • Profile image

    @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.

    2 months ago
  • Profile image
    2,186 Subsere

    @hpgbproductions I don't follow?

    2 months ago
  • Profile image

    be careful of using smooth in branches, smooth only updates when it is called, so the value in the other branch won't update

    2 months ago
  • Profile image
    3,037 griges

    @Subsere i was want to help but i wasnt understand the question .
    also when i see, you was already solved it

    2 months ago
  • Profile image
    6,341 JSTQ

    @Subsere fine

    2 months ago
  • Profile image
    2,186 Subsere

    @JSTQ I already achieved it with round()

    +1 2 months ago
  • Profile image
    6,341 JSTQ

    @Subsere What effect do you ultimately want

    2 months ago
  • Profile image
    6,341 JSTQ

    @Subsere … interchanging… Wait for me for a moment

    2 months ago
  • Profile image
    2,186 Subsere

    @JSTQ I had tried interchanging GearDown and LandingGear. I don't believe the result was any different.

    2 months ago
  • Profile image
    6,341 JSTQ

    @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.

    2 months ago
  • Profile image
    2,186 Subsere

    @JSTQ None of what you said made any sense whatsoever.
    Please rephrase.

    2 months ago
  • Profile image
    6,341 JSTQ

    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

    2 months ago
  • Profile image
    6,341 JSTQ

    So whats wrong

    2 months ago
  • Profile image
    2,186 Subsere

    @griges The pain of being Silver.

    +2 2 months ago
  • Profile image
    3,037 griges

    noone helped lol
    good one tho

    2 months ago
  • Profile image
    2,186 Subsere

    Aight, figured it out.
    The gear, not why the original method didn't work.

    +2 2 months ago
  • Profile image
    2,186 Subsere

    round() appears to hold a solution, though I'm still not sure why my original solution did not function as expected.

    2 months ago
  • Profile image
    2,186 Subsere

    Altered the title and text to reflect my current issue.

    2 months ago
  • Profile image
    2,186 Subsere

    I cannot determine conclusively whether or not Input accepts true/false

    2 months ago
  • Profile image
    2,186 Subsere

    New problem, differing timing on retracting and extending.

    2 months ago
  • Profile image
    2,186 Subsere

    The secret ingredient is lying

    2 months ago