Jump with Gamepad

This topic contains 2 replies, has 2 voices, and was last updated by  stolenmeatball 4 months ago.

  • May 28, 2016 at 4:20 pm #150638

    I’ve been testing the kit on my Apple TV and I’m using the Nimbus controller. Everything feels right except for the jumping. I realized why it feels strange. It’s because the jump happens when you release the A button, not when you press it.

    I’m looking at the code and trying to find a way to change it. Any ideas?

  • May 30, 2016 at 12:53 pm #150695

    Funny, I never even noticed. Just played again and still didn’t at first. Try this, in the GameScene_GameController.swift, around line 580, find….

    #if os(tvOS)
                        
                        if (self.paused == false){
                            
                            if ( gamepad.buttonY.pressed == false){
                                
                                self.pressedJump ( playerBeingControlled! )
                                
                            }
                        } else {
                            
                            self.menuSelectionMade()
                            
                        }
                        
                    #endif

    Try switching false to true in the interior if statement .

  • May 30, 2016 at 11:23 pm #150778

    Thanks I will try that!

    I didn’t notice at first either. I was playing Horde and something just felt off. It took me a while before I realized why my jump timing was off.

You must be logged in to reply to this topic.