I have coins that I’m spawning and making fly from left to right so the player can jump up and collect them. When they collide I just want to destroy the coin and increment the coinCount. The problem is that when the coin hits the player, it knocks him around a little bit. I’ve already locked all of the axis and rotation I can on the player but I’d like to make the coins have no impact on the player at all. Reducing the coin mass makes them not move across the screen properly. Is there a better way to move the coins or should I be using isKinematic? I read that moving an object without a rigidbody is bad for performance which is why I did it this way.
var objectSpeed : float = 100;
function Start ()
{
}
function Update () {
rigidbody.AddRelativeForce(objectSpeed/100*-1, 0, 0);
}
Turning them into triggers didn't make much of a difference, I'm guessing because I was destroying them after the collision anyway so they didn't have time to bounce off of anything. I made them triggers anyway, since I think that's probably more appropriate. Moving with velocity fixed the issue. function Start () { rigidbody.velocity = Vector3(-2,0,0); }
– imnickb