New Release: Controller Update 🕹️

Prob any that you can hook up via usb or bluetooth

No I meant in the behavior, does A mean A on Xbox or A on Switch?

ps4, xbox, and nentendo all have a similar button layout

It is whatever the controller sends as “button 1”, which on PS is an “X”, Xbox is an “A”, etc. You’ll have to test it to see what your specific controllers map to.

3 Likes

The bundle people would use for this would be called Controller Controls

1 Like

Now that wE havE controllEr inputs, I’ma go find the NintEndo Switch DEvElopEr Portal, :b:ye

1 Like

is there anyway to add flip and animations in your simple code???

1 Like

For flipping:
speed number>filter(less than 0)
Pass:
flip(flip)
Fail:
flip(back)

For animations:
Controller(left stick x)>animation

1 Like

Yeah, sure - but then it will look pretty similar to what @JR01 posted :slight_smile:

5 Likes

how would I rotate a weapon with the right analog stick? I’ve found a way for it to work when the camera is static, but if it moves at all, It doesn’t seem to work.

3 Likes

I added a new level to the example I posted above, that one has a spaceship that rotates. This is the rotate logic I used:

1 Like

Cool, Thanks, but I probably should have been a bit more specific. I have a game where a weapon points directly at the mouse. do you know how I would do something like that (mousemove>pointat) with the right stick?

I modified the AngleTo bundle to point in the direction the stick is pointing at.
Here’s the test I’ve been using, but I plan to make it an official example later:
https://flowlab.io/game/view/1682846

Desktop Screenshot 2021.04.10 - 01.42.35.42

2 Likes

hi Grazer, can u connect the controller behaviour to a nintendo switch controller? and how can you connect the controller?

1 Like

ahaha I appreciate the thought, but maybe I should add controller support to my next game. I’m always afraid to mess up with the games that are already finished.

2 Likes

Grazer literally replied to that on this same discussion :slight_smile:

4 Likes

Thanks JR_01! this is a big help

1 Like

It does work with Nintendo Switch.

How do I make it so holding the stick right makes me keep going?

I posted an example of using the controllers for movement in this thread above. @JR01 posted an example above as well.

1 Like