New answers tagged

6

First some background... There are two flavours of "null" in Unity: Actual null "Pseudo-Null" - this is a non-null Unity object (usually a GameObject or Monobehaviour) that has been marked for deletion using Destroy or unloading a scene. The reason this is called pseudo-null is that for an object in this state, (destroyedObject == null) evaluates to true ...


2

A newbie's answer. Suppose the orange marked place is the position for your enemy to jump, you make a trigger on the orange x mark of the object on the prefab and tell the enemy ai to jump when the ai hits the trigger. Simple Answer.


4

I understand you are dealing with both box obstacles and gaps. The way it was described, I can see three possible situations. Correct me if the game is designed differently. With the first, there are no obstacles before the gap, at least no obstacles that the player can jump atop. In this case, you would need only a fix max width for the gap. In the ...


3

Do it at the generator level: Always generate your level using a selection of passable gaps / obstacles section prefabs. If two successive sections are not passable mark them as such so the generator does not put both in succession and/or adds some space between them. These sections will also instruct the AIs on how to clear the obstacles.



Top 50 recent answers are included