- Home /
Question by
rhollex · May 23 at 01:51 PM ·
2d-platformer
Build version does not work like the editor one
I've built a 2D platformer for a homework, I just finished it and wanted to build and run it. In the built version jumping on an enemy head doesn't launch me in the air like in the editor and that is what it's supposed to do.
private void OnCollisionEnter2D(Collision2D other)
{
if (other.gameObject.tag == "Enemy")
{
if (controller.Falling())
function Falling()
{
return m_Rigidbody2D.velocity.y < -0.1f;
}
That's how I see if I land on an enemy head btw. It works properly in the editor and that is all I want. It kills the enemy when I land on them, but it doesn't launch me into the air.
Comment
Your answer

Follow this Question
Related Questions
Mario like 2D Camera 2 Answers
I have this grounded script and it doesn't work 1 Answer
Newbie question about infinite runners 0 Answers
Hit/React Animation 2 Answers
OnTriggerEnter2D(Collider2D other) 2 Answers