

While performing their song "Banned in D.C." in either 1979 or 1980, H.R., vocalist of Washington D.C. The name "mosh" originates from the word "mash". In the 1990s, the success of grunge music led to moshing entering mainstream understanding and soon being incorporated into genres like electronic dance music and hip hop.ĭue to its violence, moshing has been subject to controversy, with a number of concert venues banning the practice, and some musicians being arrested for encouraging it and concertgoers for participating. In New York, the crossover between the city's hardcore scene and its metal scene led to moshing incorporating itself into metal beginning around 1985. Through the 1980s it spread to the hardcore scenes of Washington, D.C., Boston and New York where it developed local variants. The dance style originated in the southern California hardcore punk scene, particularly Huntington Beach and Long Beach around 1978. Taking place in an area called the mosh pit (or simply the pit), it is typically performed to aggressive styles of live music such as punk rock and heavy metal. Moshing (also known as slam dancing or simply slamming) is an extreme style of dancing in which participants push or slam into each other. Late 1970s, Huntington Beach and Long Beach, California, United States Then, you use Vector2.Reflect to reflect the incoming velocity by the collision normal.Audience members moshing to American thrash metal band Toxic Holocaust So you must store the value in FixedUpdate, since the next is only called after the OnCollisionEnter method. However, if you take the Rigidbody2D velocity on OnCollisionEnter, it's already the updated value. The idea here is to take the velocity right before the collision and invert it. (Please note that you should use GetComponent carefully, maybe calling it only once on Start and saving a reference, I didn't do it to keep a minimal sample.) GetComponent().velocity = Vector2.Reflect(lastVelocity, )

Void OnCollisionEnter2D(Collision2D collision) Then, create a script for the bullet: public class Bullet : MonoBehaviour First remove the Physics Material or set the bounciness to 0, to make sure the Physics Engine is not simulating it. In order to keep it bouncing forever in this case, you must code the bounciness by yourself. Gravity is disabled.įor the first test, the wall Rigidbody2D is set to Static.įor the second test, the wall Rigidbody2D is set to Dynamic, with Mass = 10 and Linear Drag = 1. The walls have a BoxCollider2D and a Rigidbody2D. The ball has a CircleCollider2D and a Rigidbody2D with Linear Drag = 0 and a material with Friction = 0 and Bounciness = 1. I've set up a minimal example to demonstrate. DerHugo's comment is on point: since the cars move when hit, they absorb part of the energy.
