2D Platformer Unity & Playmaker - Basic Enemy AI

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 18

  • @theonlycatonice
    @theonlycatonice 2 года назад +1

    So I don't know what I missed - must've gone over a couple times now, but it seems my speed won't update properly, so the sprite doesn't flip right and the right ray cast isn't used. The sprite renderer is on my GameObject too. Any ideas? 8:42 I got confused here as to which value you are referring to?

    • @BastianTop
      @BastianTop  2 года назад

      Hey buddy! Hmm hard to say what went wrong, if u can put some screenshots in the discord i can have a look later!

    • @theonlycatonice
      @theonlycatonice 2 года назад +1

      @@BastianTop I'm not sure if it is a bug but it seems like my animator variables weren't properly updating my side so I instead made 1 FSM making use of the above but setting the animator at the right steps with a raw value and not a variable. It's not ideal but it works for now and I learnt a lot about Playmaker regardless :) also realized if I flip scale (because sprite flipping wasn't going to sit right with my current animation) it also flipped my raycast lol so I only needed the left one.

    • @BastianTop
      @BastianTop  2 года назад

      @@theonlycatonice good that you got it to work ^^

  • @Duuude9448
    @Duuude9448 4 года назад

    nice one cant wait for charge Ai

  • @risingdagger5416
    @risingdagger5416 3 года назад +1

    The raycast isn't shooting out and not detecting the ground for me, Ive also already set the ground to ground layer?

    • @BastianTop
      @BastianTop  3 года назад

      Hi, did you try to select debug in the action, so you can actually see the line?

    • @risingdagger5416
      @risingdagger5416 3 года назад

      @@BastianTop hey there Bastian, i debugged the line but nothing is shooting out

    • @BastianTop
      @BastianTop  3 года назад

      @@risingdagger5416 perhaps you can join discord and put a screenshot, i can have a look later

  • @natichang6806
    @natichang6806 2 года назад

    I dont know why my sprite is not flipping.. in my direction fsm it doesn't transition from left to right .. so enemies just fall off because right raycast is ignored as the transition is not happening when moving positive direction.. what seems to be the problem??

    • @BastianTop
      @BastianTop  2 года назад

      Feel free to join the discord and post some screenshot. Probably some small issue!

  • @Razorhead777
    @Razorhead777 4 года назад +1

    8:40 sprite set flip is not available in my action browser :/ is there something wrong I'm doing ?

    • @BastianTop
      @BastianTop  4 года назад +1

      Hey razorhead, make sure you have the latest version and check the ecosystem for that action, if you have not used the ecosystem before i made a tutorial for it, please check it out 👍

    • @risingdagger5416
      @risingdagger5416 3 года назад

      @@BastianTop I've installed the Ecosystem but there is still no sprite set flip? Or am i missing something else

    • @BastianTop
      @BastianTop  3 года назад +1

      @@risingdagger5416 That is really strange, I just checked in my Unity and it is available for me. I tried checking in the ecosystem but the server seems down... What you can do in the mean time as a backup solution is, drag the Sprite Renderer into playmakers state area and select "Set Property" From there you can find Flip X... It is not ideal but give it a shot!

    • @risingdagger5416
      @risingdagger5416 3 года назад +1

      @@BastianTop Alright i'll give it a try thanks Bastian Loving the youtube tutorials so far

  • @Duuude9448
    @Duuude9448 3 года назад

    lol spend 2h to get it why why monster do not flip and i found out dat you didnt put wall detection ;/ ... how can i do it ? cause i have walls.. was trying to make detect walls for 4h and cant do it...

    • @BastianTop
      @BastianTop  3 года назад

      I will include it in advanced enemy AI, similar principle as detecting the ground!