My player dissapear

After i implement the scrolling background, my player bullet`s goes in to the player and the player take damage from his own bullets, i think this is happened with enemy too

Hi,

Jump to the lecture named “Layer Collision Matrix” (currently #107). The issue gets fixed there. Also make sure that the z-position of the background is set to 10.

But the bullet dont go away, the apear on player position and cause damage to player.

what can i do?

Did you watch the lecture I suggested? Alternatively, you could instantiate the bullet with an offset to the player’s position.

Yes, i watch the lecture, and that dont help. How can i do an offset?

For example like this:

Vector3 offset = new Vector3(0f, 2f, 0f);
Vector3 laserPos = transform.position + offset;

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms