9 Matching Annotations
- Oct 2022
-
login.codingdojo.com login.codingdojo.com
-
Within void Update(), write an If Statement: If our X movement is NOT 0, or our Y movement is NOT 0 (in other words, if we are moving), then measure the player's X and Z movement values and make that "facing." (Lines 24-28)
? Make it facing?
-
Try turning your camera to an angle, your player should now move in the proper direction at all times.
? what is meant by proper direction?
Tags
Annotators
URL
-
-
login.codingdojo.com login.codingdojo.com
-
A question people often ask is, why are we setting our Rigidbody's Z velocity to be 0, while the Y is set to "rb.velocity.y?"Although we aren't moving the player by its Y axis, we still want to be able to move on this axis. What do we mean by that?When we jump, we go up. When we fall, we go down. If we set our Rigidbody's Y velocity to be 0, we won't have natural gravity.
^ Keeping the Rigidbody's y velocity for jumping and falling
-
Take the player's Rigidbody and update it's velocity (another word for speed) based on our movement Vector3.
^ We can update a Rigidbody's velocity
Tags
Annotators
URL
-
-
login.codingdojo.com login.codingdojo.com
-
Now let's use Vector3's to make an object grow tall and skinny.
Manipulating object's scale
-
changing an object's position directly like this is not recommended for basic player movement.
? not recommended to use vector3 for player movement
-
Create a public Transform variable. Any game object we plug in as this variable will have its Transform component plugged in.
Changing the transform of one object to another's
-
In this next example, we will change just the X position of our game object using Vector3s,
-- Vector3 allows us to change the individual axes
Tags
Annotators
URL
-
-
login.codingdojo.com login.codingdojo.com
-
Rewired was today's newest tool to work with. With Rewired
? What is Rewired?
Tags
Annotators
URL
-