Unity Basics Flashcards
What should the Y axis be to position a gameobject perfectly level on a plane?
0.5
How to add physics to a gameobject?
Add a rigidbody component
When is Update() called?
Before rendering a frame
When is FixedUpdate called?
Before performing any physics calculations
What is an easy way to have the camera follow a gameobject?
Make the camera a child of the gameobject
Which Update() is best to use for follow cameras, procedural animations, and gathering last known states?
LateUpdate()
What is a prefab?
A prefab is an asset that contains a template or blueprint of a game object or game object family
What happens when you make a change to a prefab?
All of the prefab instances in the game will be updated with the changes.
How to make a game object dynamic?
Add a collider and a rigid body
What determines whether a collider is static or not?
Whether or not it has a rigid body
How to prevent an object with rigid body to react to physics?
Make the rigid body kinematic
If a collider is moving or rotating (not static like a wall), what should you do to prevent the collider from being cached every frame?
Make the collider dynamic by adding a rigid body
How are kinematic rigid bodies moved?
By using their transform
How do you use a mesh collider alongside a rigid body?
Mark it as convex
how would you write a 0.0 float in unity c#?
0.0f