- Home /
Question by
EliteHedgehog56 · Dec 29, 2018 at 08:33 AM ·
cameramovementshake
shake camera when boost pad is triggered
I have boost pads in my racing game where if a ship drives over it it boosts the ship forward (when colliding with bost collider) is there a way I can add a script that causes the camera to shake when the ship boosts after hitting the boost pad?
here's what I've got to start off (it's in javascript)
function Start () {
}
function OnCollisionEnter(collision: Collision) {
if (collision.gameObject.tag == "BoostPad"){
var hit = collision.contacts[0]; // let's get the first contact
// find the rotation needed to make the smoke perpendicular to the hit surface
var rot = Quaternion.FromToRotation(Vector3.up, hit.normal);
Shake();
}
}
function Shake () {
//shake camera when boost pad is touched
}
Comment
Best Answer
Answer by giveson · Dec 30, 2018 at 10:06 PM
there sure is: watch brackeys video
screenshot-4.png
(138.2 kB)
Your answer
Follow this Question
Related Questions
How to allow movement during camera shake? (iTween) 0 Answers
Shake and move at the same time 0 Answers
Getting Camera to Stop Following Player 1 Answer
character movement follows the direction of camera -1 Answers
Object moving faster when camera moves with it than without camera movement 0 Answers