Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://puu.sh/lOui Collision of player object (named Player) with powerup block (named Powerup). Both have Box Colliders.
- Code in Player script:
- function OnCollisionEnter (myCollision : Collision)
- {
- if (myCollision.gameObject.name == "Powerup")
- {
- powerLevel += 1;
- Destroy(myCollision.gameObject);
- }
- }
- Do they need rigidbodies or something?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement