1. #1

    need editor help, something is wrong with my logic

    having got very confused with the way redlynx have made their example FPS camera i thought i'd try and make my own, because then i'd know what everything does.

    however, i have a problem with using the LT (brake) to act as an aim steadying button.

    this is the logic i'm using:


    basically, i have a motor turning round a dummy object, and its target rotation speed is being fed by the right stick. this first dummy object is feeding its horizontal rotation values to a second dummy object which is glued to the camera, physics bubble, camera target, etc.
    (a few more dummy objects than is really necessary, but this means alot of the parts can be moved out of the way of the game character)

    the turning part works just fine. moving the right analogue stick left and right rotates the camera as it should
    however, the brake is having no affect no matter what i do to the filter. i can change its value, change its function, etc, but no matter what i do the brake button has no effect.

    if i plug the value of the brake directly into the divide function it works just fine, slowing the rotation as it should in , but my attempt to make the brake an on/off value (rather than 0, 1, 2 or 3) is making something go wrong
    does anyone have any ideas?


    tl/dr: help me make a function that tells me if the brakes are on or off, but only outputs 0 or 1




    *edit*
    after all that typing i have an idea that might work. i could go:

    brake value --> divide by 3 --> ceiling
    (brake value has a range 0-3)

    that should get me a brake that is either 0 (off) or 1 (on)

    any other ideas are still appreciated, because this one is bound to fail somewhere
    Share this post

  2. #2

    Re: need editor help, something is wrong with my logic

    A lot of people forget that you need an impulse in to the generic filter in order for it to work. Could this cause your problem?

    Also, if I understood correctly, you want left trigger to be only on/off and you don't need analog input from it?
    You could then also use the LT/X -trigger.

    Now that I read your post again, I'm pretty sure you forgot the impulse for the generic filter. This would explain why your filter seems to have no effect.

    Edit2. If you don't want to use impulses you could take a two-input operator and set it this way:
    Game variable datasource brake Greater Equals 3 which returns 0 on false and 1 on true. I hope this helps.
    Share this post

  3. #3

    Re: need editor help, something is wrong with my logic

    thanks, i didnt realise the filter needed explicit impulses, so thats probably what the problem was. your method sounds even simpler than my edited method, so i'll probably use it when i go back to my FPS testbed

    i've ditched the dummy objects because they were being affected by the g-force of the movements of the ball and am now using pretty much the same system as the example FPS level.
    i have another problem though. whenever i rotate the camera diagonally, the camera banks to the side despite me setting the bank to zero explicitly, and the interpolation factor to its fastest. when i make fast diagonal movements it almost makes me feel seasick. is there any way to stop this?
    Share this post