Download the code from here gist.github.com/Mohammad9760/...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
in this video you will learn how to use Unity's New Input System to Rotate GameObjects by Dragging with mouse or touch.
I'll show you how you can use the new Input system's action binding without creating input action maps, you can easily use this code on your
gameobjects without changing your input action asset.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Watch more Unity Tutorials: • Create in Unity
Unity Visual Effects Tutorials: • Create Game Visual Eff...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
contents of this video
0:00 intro
0:25 setup the scene
0:51 creating the Input Actions
2:00 detecting touch/mouse drag
4:30 getting the axis
5:25 rotating
6:40 setting up the Input Bindings
8:20 rotate based on camera view
10:10 togglable inverted rotation
Негізгі бет Rotate Objects with New Input System (Touch and Mouse)
Пікірлер: 47