Tag Info

New answers tagged


Your primary problem is when you modify the velocity directly: rigidbody.velocity = moveDir * speed; Here, your moveDir variable is only getting its x value set, so the z value is zero. That means that whatever you did to change the velocity later on in the code, gets erased the very next frame when you use the above line of code. You can either not ...


Yes, you can use layers, making the player and the power up different layers. This means they won't collide however, so it'll be difficult to detect when the player picks up the power up. Alternatively, you can make the power ups have a collider, but set it to trigger. This means the power ups will not collide with other objects but rather only cause the ...

Top 50 recent answers are included