character follows the mouse on an axis

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kao_Shinpa

Hello Creatives
I am making a video game about a car on a small planet that is driven with the mouse

I want to make the character (the car) follow the mouse on a single axis (X)
I saw many videos about “follow the mouse” but they are all in 2D

Help please

Hola Creativos
Estoy haciendo un videojuego sobre un automóvil en un pequeño planeta que se conduce con el mouse

Quiero hacer que el personaje (el auto) sigua al mouse en un solo eje (X)
Vi muchos videos acerca de “seguir el mouse” pero todos son en 2D
Ayuda por favor

:bust_in_silhouette: Reply From: exuin

Just change the position.x value and don’t change the position.y value.