playMaker

Author Topic: Making a basic first person controller for gamepads?  (Read 1190 times)

aeroW45

  • Playmaker Newbie
  • *
  • Posts: 8
Making a basic first person controller for gamepads?
« on: May 09, 2020, 11:49:47 PM »
There is information on how to make a first person controller for Playmaker with keyboard and mouse, but i have not found anything for a gamepad. Im able to move around in first person with one joystick, that part has been easy to do but turning and looking around has been the complicated part. This seems like it should be a very basic thing to do, so i been surprised at the lack of tutorials and information on it.

Is there a "look at mouse" style function for the gamepad. I seen people say they are using the mouse inputs as gamepad ones but that seems like a workaround rather a proper solution. If anyone has made a first person controller for gamepads and would like to share how they achieved it, that would be awesome. Thanks.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Making a basic first person controller for gamepads?
« Reply #1 on: May 10, 2020, 06:11:26 AM »
Hi.
have you tried getting the axis from the right stick and then use that on rotate (per second enabled) ?

aeroW45

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Making a basic first person controller for gamepads?
« Reply #2 on: May 10, 2020, 01:25:14 PM »
Hi.
have you tried getting the axis from the right stick and then use that on rotate (per second enabled) ?

Hello. i have two issues with the axis/rotation approach.

1. The camera can do a 360 turn and end up upside down.

2. Even if the upside down turn issue was fixed, as the camera is moved, even just side to side it slowly start to tilt sideways and stays there. As if the movement doesn't know which way is up.

Any way to fix this issues? Thanks.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Making a basic first person controller for gamepads?
« Reply #3 on: May 11, 2020, 01:35:09 PM »
hi.
Probably best to use parenting.
main parent to rotate left right and child to rotate up/down.
to limit you can use a float clamp

aeroW45

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Making a basic first person controller for gamepads?
« Reply #4 on: May 12, 2020, 09:04:40 AM »
hi.
Probably best to use parenting.
main parent to rotate left right and child to rotate up/down.
to limit you can use a float clamp

I haven't tried the clamping yet, but for basic looking around this did work, thank you so much. I really appreciate your help.

Edit: Also i found an ecosystem action called "input look" which is a variation on the "mouse look" action and also works great for first person gamepad movement.
« Last Edit: May 12, 2020, 09:07:26 AM by aeroW45 »