How do I interact with gameobjects using a PS4 remote?

I keep seeing the interactions videos with click to move with the mouse but nothing on the remote. What are the steps taken to interact with objects using a PS4 remote?

First, you need to understand what user input is. In Unity, we’ll go with there being 3 main types. Buttons, Axis, and Positions.

  1. Buttons are the easiest, as they are either on or off. This gives 3 triggers, just pressed down, held down, and just released.
  2. Axis is defined as a float clamped between -1 and 1. This represents a joystick or a set of arrow keys that form an axis. How far the joystick is moved from rest defines the value of the float. Even though the joystick might have full 360 motion, it’s still represented in vector form as just an x and y axis
  3. Position is a bit more unique. This is for touchscreen devices as well as your computer mouse. These have many associated values, such as velocity vectors, or time touched for touchscreen, but mostly used for relative position in the screen.
  4. There’s also VR but I’m not covering that here.

What you are asking is how to translate your knowledge of mouse input to controller input. A mouse has 2 buttons, a scrollwheel (special weird case 2Dposition/button), and a position. A controller has many button and often 2 joysticks (4 axis). In short, there is no literal or easy translation from one to another, but there are many ways around it.

Specifically what you want is to “interact with objects”. If you want a literal version of what you’d see in a computer, you can rig a crosshair to move around the screen (setting its vertical/horizontal velocities to the vertical/horizontal axis input of one of the joysticks). Then, using any of the buttons, when the crosshair is over an object you have it do whatever you want to it.

Another option is more of a first person deal, where the crosshair is fixed to the center of the camera, but the camera can be moved around. Other than that, it’s the same.

Lastly, you can have a more complicated system were one joystick can ‘jump’ between various objects in the scene, and manipulate them from there.

If there’s anything specific giving you troubles, just ask in the comments, this is just a rough guide from going from mouse to controller input. It certainly took me awhile to figure it out on my first attempt