playMaker

Author Topic: Xbox right stick camera control [SOLVED]  (Read 90 times)

ingumak

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Xbox right stick camera control [SOLVED]
« on: November 12, 2017, 06:47:10 AM »
Hello!

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

https://www.youtube.com/watch?v=CZ1YqjrGVQY

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!!
« Last Edit: November 12, 2017, 10:37:18 AM by ingumak »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2254
    • View Profile
    • jinxtergames
Re: Xbox right stick camera control
« Reply #1 on: November 12, 2017, 07: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.

ingumak

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: Xbox right stick camera control
« Reply #2 on: November 12, 2017, 08: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!!!

ingumak

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
(SOLVED) Xbox right stick camera control
« Reply #3 on: November 12, 2017, 10:36:46 AM »
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!!!