Appendix
Appendix
3.1 Introduction
It will provide useful tips and commands to work on unity.
3.2 3D GrameObjects
- Zooming:
- After selecting any object press
Fto zoom - Use the scroll wheel or trackpad to get to a good distance.
- After selecting any object press
- Orbit around view: Select object in
Scene viewthen HoldAltandleft-clickand drag with your mouse to orbit around the object. - blocking the old input API (
Input.GetKeyDown). It is not about physics or Rigidbody. It is only about input handling mismatch.- Option 1: Enable BOTH input systems- Steps
- Go to Edit → Project Settings
- Click Player
- Scroll to Other Settings
- Find Active Input Handling
- Change it to:
Both - Click
Applyto Restart Unity. You code should work1 2 3 4
if (Input.GetKeyDown(KeyCode.Space)) { myRigidbody.velocity = Vector2.up * 10; }
- Option 2: Use New Input System Properly- If you want to stay modern, replace your input code:
- Add this at the top
using UnityEngine.InputSystem; - update code to for using space bar key
1 2 3 4 5 6 7
void Update() { if (Keyboard.current.spaceKey.wasPressedThisFrame) { myRigidbody.velocity = Vector2.up * 10; } }
- Add this at the top
This post is licensed under CC BY 4.0 by the author.