Answer the question
In order to leave comments, you need to log in
How to solve the problem of incorrect spawning?
On the stage, the enemy and the hero, when the hero crosses the "beam" coming out of the enemy's weapon, a laser flies out, until some point it was like that, but after the project was abandoned and opened after some time, instead of spawning the 1st laser, spam of lasers began , I can’t understand why, I didn’t seem to change anything, but it just can’t stop working?
Answer the question
In order to leave comments, you need to log in
I don’t know what was there before, but now according to the code, each cycle of physics (it’s strange why they didn’t do it in Update)
you check if it was hit by a beam.
since there are a couple of tens of cycles per second - it's not surprising that the condition is triggered several times almost in a row))
maybe the timer was arranged differently there before.
or in the project settings fixedDeltaTime for some reason was changed to some rather large value (which, in fact, was not worth doing)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question