Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ingumak on November 12, 2017, 08:47:10 AM

Title: Xbox right stick camera control [SOLVED]
Post by: ingumak on November 12, 2017, 08:47:10 AM
Hello!

I am creating my own character controller.
I have done it following this tutorial. The first 4.


Everything works fine But in this tutorial we only talk about controlling the camera with the mouse. And I want my character to be controlled with my Xbox controller. I'm looking at some advice where people say how to create a new entry in Unity. And there are not problems here.

But once I have created the entries with axes 4 and 5, how can I configure playmaker actions to move the camera around my character as the tutorial but playing with the right stick?

Thank you!!
Title: Re: Xbox right stick camera control
Post by: djaydino on November 12, 2017, 09:45:45 AM
Hi,
You would need to compare you axes, for example:
if greater than 0.1 rotate left by using the 'Rotate' action and use 'per second'.
You will need 2 fsms, one for horizontal and one for vertical.
Title: Re: Xbox right stick camera control
Post by: ingumak on November 12, 2017, 10:49:25 AM
Hi! I have solved by this way. Thank you!!! I was trying something similar, but without sucessfull. Really thanks!

But now I have another problem that I was not aware! Maybe it is very obvious but now the camera rotate around the character by the wrong way. It should stay at the same height and rotate around the character

Normally the camera should move around the character without moving on the Y axis. But in my case as the camera rotates around the center of the character, if in the back of the character it is up, when it rotates 180 degress, I see the character by down. (Something totally logical. But I had not noticed something so obvious. jajajaja).

I don´t know if I am explaining correctly. If no one understand I can load some images.

But if anybody undestand my problem. There is any way more o less simple to solve this?

Thanks!!!
Title: (SOLVED) Xbox right stick camera control
Post by: ingumak on November 12, 2017, 12:36:46 PM
Ok! Finally I got it. And with a really sinple solution. In the inputs, I only have duplicated the Mouse X and Mouse Y and I have kept their names and I have changed a couple of parameters. Now the action Mouse look works with mouse and with right stick.

I´m not sure if in the future this solution will came troubles, but for now works well.

If anybody know if this solution it is not good I will very grateful for your feedback and help.

Thanks!!!