A human trampoline
Now, you'll get to jump on the trampoline yourself.
Feature: When a first-person character hits a trampoline, it bounces up, diminished by gravity.
Like a brick
One approach towards implementing this feature could be to treat the MeMyselfEye
first-person character like Brick
and give it a Rigidbody and a Capsule Collider so that it can respond using physics. We'll try this first just to see whether it works. For this to work, we need to disable its Character Controller component and start at the brick's position above the trampoline so that we can just drop, as follows:
Navigate to File | Save Scene As and name it
HumanTrampoline
.Delete
Brick
in Hierarchy; we won't need it.With
MeMyselfEye
selected in Hierarchy, set Position to (0
,5
,0
).Navigate to Add Component | Physics | Rigidbody.
Navigate to Add Component | Physics | Capsule Collider and set its Height to
2
.In the Rigidbody panel, under Constraints, check off the Freeze Rotation X, Y, Z checkboxes so that we don't get...