- Home /
Particles Pushing Object up
Hey everyone,
I'm trying to make a particle system push my game character up. Its pretty much a ball that the player is roll, then when it goes on an air conditioner, the air blows it upwards. Does anyone have any info on this?
Thanks
Answer by Joshua · May 01, 2011 at 04:44 AM
Simply add a capsule/sphere collider to the particle emmitter, depending on the shape of the cloud of particles - or add it to an empty gameObject which will be positioned in the center of the cloud. Then set the collider to trigger and use:
var gravity = -9.81; var force
function OnTriggerEnter (other : Collider) {
other.attachedRigidbody.AddForce(0,force-gravity,0);
}
Set Gravity to the gravity your project uses, or none if the rigidbody doesn't use gravity. Set force to the up-force up want applied.
Your answer
Follow this Question
Related Questions
Preventing "zombie fish"? A question about stretched particles. 1 Answer
player pushing away particles 0 Answers
[Shuriken] emitting particles at arbitrary locations 1 Answer
unable to disable game object after user input 1 Answer
Is it possible to adjust the properties of already generated particles? 1 Answer