Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Controller feature test

edwin123
Registered User
Quote
2023-01-24 18:40:40

@just_in_case , thanks i think


Aiming_bullets
Guest
Quote
2023-01-25 04:28:48

I tried it on my controller but was having same issue, the player doesn't move diagonally if Analog is On, but works fine with stick and d-pad if analog is off.

Really happy that you are adding necessary features to the engine. It is more fun and easy to control the player with the controller in CC.


okeoke
Registered User
Quote
2023-01-25 08:58:49

Actually, getting the real axis value would be great. Currently. you can use a gamepad with tools like joy2key, but it only works for the digital keys, since it just remaps them to the keyboard. It's not possible to get the analog input that way.

Is controller support going to be included to the next Coppercube version?


just_in_case
Moderator
Quote
2023-01-25 09:20:20

@okeoke Nope, it is not going to be in the upcoming version but will be available in the next version after that.
I fixed a few things in the API and checked it and now it works just fine diagonally and all.
I am now setting up a basic project in which we can use the controller.


DouweDabbe
Guest
Quote
2023-02-02 04:26:33

There is also interesting hardware for this on the phone:
* Razer Kishi V2 and
* Backbone One


just_in_case
Moderator
Quote
2023-02-04 06:18:01

I don't have mobile controllers, and unfortunately, these API commands are for Windows and macOS only.


just_in_case
Moderator
Quote
2023-02-09 06:08:03

It took me a lot of time, but I finally managed to do it, I know it could have been easier for someone with C++ knowledge but yeah.
After so many trials and errors and different things.

I finally managed to create the controller script to utilize the commands to their fullest.
The use of the axis and POV was easy but the implementation of the buttons was a bit hard for me.
It was not working with the usage of multiple button presses. but now I managed to make it work.

Updated the Repo with the new test project.

You can move the player with the pov and axis, you can shoot with the "button1", run with "button5" (L1), and hide or unhide the overlay at the top with "button6"(R1).

you can try pressing the buttons simultaneously together and they will work just fine, I have updated the API command a bit, in order to make it work perfectly.

here is the link to the repo again - https://github.com/vazahat/CC-ex...

Download the repo and try running "Win32Player.exe" located inside the Release folder.

The only thing I am lacking is a test with dual or multiple controllers. If anybody is up for helping me test multiple controller support then let me know.


writer
Guest
Quote
2023-02-10 07:58:57

xbox one controler worked


just_in_case
Moderator
Quote
2023-02-10 12:57:36

@writer thanks a lot for the confirmation that it works on Xbox one controller.


ragnarrandom
Registered User
Quote
2023-02-23 18:16:37

8bitDo Pro 2 Wired Controller

works flawlessly

i would love to see gamepad support in coppercube


serge
Registered User
Quote
2023-02-28 19:23:04

wrote:
It took me a lot of time, but I finally managed to do it, I know it could have been easier for someone with C++ knowledge but yeah.
After so many trials and errors and different things.

I finally managed to create the controller script to utilize the commands to their fullest.
The use of the axis and POV was easy but the implementation of the buttons was a bit hard for me.
It was not working with the usage of multiple button presses. but now I managed to make it work.

Updated the Repo with the new test project.

You can move the player with the pov and axis, you can shoot with the "button1", run with "button5" (L1), and hide or unhide the overlay at the top with "button6"(R1).

you can try pressing the buttons simultaneously together and they will work just fine, I have updated the API command a bit, in order to make it work perfectly.

here is the link to the repo again - https://github.com/vazahat/CC-ex...

Download the repo and try running "Win32Player.exe" located inside the Release folder.

The only thing I am lacking is a test with dual or multiple controllers. If anybody is up for helping me test multiple controller support then let me know.



I test with a Xbox controller so analog movement works. I press on button A for xbox controller it shoot. I press right button trigger it hide overlay.


ragnarrandom
Registered User
Quote
2023-07-06 15:16:42

any progress on this actually getting added to coppercube so we can use it?


presidentg
Registered User
Quote
2023-07-06 21:14:52

Works astonishingly well with an xbox one controller. Do you plan to release the ccb file?


just_in_case
Moderator
Quote
2023-07-07 06:32:58

Hi there, this has been already added to the new API, and in next update of CC you will be able to utilize this. Thanks for checking this out though :)


Chris
Guest
Quote
2023-07-16 15:19:27

@just_in_case just what I'm looking for... I guess.
I'm currently building a diy controller; is there anything to take in account upfront in regard to use a sensitive touch sensor in combination with your script?

I'd like to get a pressure based movement for the FPS, so instead of WASD pressed 100%; I'm aiming for a 0-100% solution which takes multiple-data-points as how fast the character moves ingame.

Basically I'd like to map the sensor data onto WASD.
Does your joystick *update support WebGL too?
Thank you


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact