So right now, I am using an invisible shotgun of sorts to create "wind" from fans. NOt so great on performance though, as it requires MANY shots,e ach with small mass to accomplish this. What I want to do is this...
create a triggered body in the shape of a cone.
onCollision(hitInfo : Collision)
{
hitInfo.RigidBody.addForce(pointing the same was as the cone / Vector3.Distance(coneOriginObject,hitInfo.rigidbody.transform);
}
Now, as you may have guessed the part I can't figure out, API or Properties is the part where the force applied to the object is in the same direction as the cone is pointing.
Something like addForce(cone.transform.foward) or something? Once I have that, I can easily scale and adapt the force, I am just unaware of how to add force at the same angle as as the originating objects Euler or transform.angle as opposed to the colliding object. I hope that makes sense.
Alternately if someone could fill me on how to improve performance if about 48 small, fast moving invisibles with trails....
Thanks folks
↧