OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: aLlamaWithARifle on 25 Jul 2011, 18:23:35

Title: Flipping a vehicle on it's side
Post by: aLlamaWithARifle on 25 Jul 2011, 18:23:35
I want to be able to flip a car on to it's side as if an explosion next to it caused it.

How would I go about doing this? I don't just want the car to appear on it's side but more like be flipped so there is a transition between car right way up and car on it's side.
Title: Re: Flipping a vehicle on it's side
Post by: Pirin on 26 Jul 2011, 00:31:18
Don't entirely understand it, but after playing around with setVectorDirAndUp (http://community.bistudio.com/wiki/setVectorDirAndUp) this seems to be pretty reliable in setting a vehicle on it's side facing north:

Code: [Select]
this setvectordirandup [[0,0.5,0.5],[0.5,1,1]];
Now, if you want it to actually flip in real time while the player is watching but without an explosion you'd be better of reading this thread (http://forums.bistudio.com/showthread.php?p=1470985) and learning trig. :)
Title: Re: Flipping a vehicle on it's side
Post by: aLlamaWithARifle on 26 Jul 2011, 11:33:42
Well I do plan on putting an explosion in the midst so it looks like the explosion flipped the car. Does that make it easier?

Thanks a lot I'll read through that thread and see what I can come up with