make a script for 2d sprite object in unity, drag left and right to move in that…
Jump to turn (10)
- 1make a script for 2d sprite object in unity, drag left and right to move in that
- 2add the part how you detect on screen which side is being dragged on by the fing
- 3can you substistude onmousebuttondown instead of touch
- 4Detect which side youre dragging when you click and drag the mouse
- 5how to make cinemachine virtual camera move with the player
- 6my virtual camera is spinning help!!
- 7how to use cinemachine to follow player
- 8how to use Addforce
- 9what does forcemode.impulse mean and do i need to add it? what happens if i dont
- 10how to use rb.velocity but make the player fall down if there is no ground below
- User
make a script for 2d sprite object in unity, drag left and right to move in that direction (x direction)
- Assistant
Sure! Below is an example of a script that allows a 2D sprite object to move left and right in Unity.
C#