Project Boost touch input

Hi Team,

Has anyone been able to change the controls to Touch-based controls, if so could you share some insight on how I can achieve the same goal, I have been looking around but have not been able to come up with anything that allows constant force, I have only been able to get multi tap but as you can imagine tapping the screen like a crazy man just to get your rocket airborne is not what you would call good mechanics :smiley:

Anyways, any info would be appreciated.

In the next project, Argon Assault, we’re introduced to CrossPlatformInputManager. It might be what you’re looking for. You can use it to define any arbitrary axis, which you can then treat as either an analog or digital interface. For example, I’ve used it to setup my shoulder buttons for aileron rolls in Argon Assault, treating them as digital inputs by using the digital interface on it, using the label I defined:

private void PollRolls()
{
    if (!alive || rollDirection != 0) return;

    if (CrossPlatformInputManager.GetButton("RollLeft")) rollDirection = 1;
    if (CrossPlatformInputManager.GetButton("RollRight")) rollDirection = -1;
}

So when I call it a digital interface, I mean that it will return either true or false, 1 or 0, but you can also use the ramp and falloff to simulate an analog axis through what I’m calling the analog interface, i.e. CrossPlatformInputManager.GetAxis(“RollLeft”) would return a number very close to zero (but not quite) in the first frame it was pressed, ramping-up to 1 over the ramp time, frame by frame; this might be a better way to apply a force, because it will lerp itself, giving a smoother roll-on and roll-off of force (which are easy to tweak by messing with the ramp and falloff values, called “sensitivity” and “gravity” in Edit… Project Settings > Input…

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms