Hello im trying to convert this c# code into javascript so i can change it with other javascripts. But i get errors, i’ve fixed the most things but now i really need help. Thanks.
the error is on row 30.
public function Explode (explosionPoint : Vector3)
{
hitColliders = Physics.OverlapSphere (explosionPoint, blastRadius, explosionLayers);
//Here is were i get errors
foreach (hitCol : Collider in hitColliders)
{
hitCol.GetComponent(Rigidbody).isKinematic = false;
hitCol.GetComponent(Rigidbody).AddExplosionForce(explosionPower, explosionPoint, blastRadius, 1, ForceMode.Impulse);
Instantiate (ExplosionPrefab, transform.position, transform.rotation);
DestroyWall();
}
}