Touch
On mobile and tablet, in normal Three.js APIs, touch drag and pinch controls the camera.
If you want to use touch to do something else,
you can override the touch camera control,
and capture Touch events yourself in your JavaScript.
Below are sample Worlds showing touch drag for moving an agent around the World,
and touch tap on an object to change it.
Run these on mobile to see.
- These Worlds uses
touchDrag
functions, which are support for Touch drag and tap actions
provided by the API.
- See a JS code search of all Worlds for use of touchDrag.
Zombie Death Baby 803 runs ♦ 1 like
By
Starter user Created: 11 Jun 2018
Modified: 17 Sep 2023
How to make a fun touch game for mobile. Touch drag and tap objects. Mouse drag and click object... Touch World 472 runs ♦ 1 like
By
Starter user Created: 6 Jan 2018
Modified: 17 Sep 2023
How to override default touch handling. Mobile: Touch drag moves agent, touch pinch zooms camera...