Search Unity

[RELEASED] Rex Engine: A Unity 2D Platformer Engine

Discussion in 'Assets and Asset Store' started by BeeZee, Jun 20, 2017.

  1. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Whoa, that's a new one. It looks like Unity is having trouble finding the Rex scripts.

    I guess the first obligatory disclaimer is, I'd recommend backing up your project before updating Rex -- or importing/updating any other plugin or asset, for that matter.

    I notice in the console window of your screenshot, the first error is coming from ChargeProjectile.cs. I went into my own project files, and I realized that ChargeProjectile.cs has been deprecated -- it's no longer a part of the Rex project (in favor of ChargeAttack, which does everything ChargeProjectile used to do and more.) You should be able to safely delete ChargeProjectile.cs. Does that fix it? If not, it should hopefully at least bring us one step closer.
     
  2. CupOhJoe

    CupOhJoe

    Joined:
    Dec 27, 2017
    Posts:
    5
    Hey @BeeZee,

    Yeeeeah, going to baaack that up pronto when it comes to making back-ups!
    So good news and bad news, deleting the ChargeProjectile.cs made it so I'm able to get back into the game and most other things function the same. But I noticed the melee attack is also firing, so I'm wondering if that might have something to do with the Input Error.

    Because when I went and checked PlayerSubmit0 under the drop down from Edit>Project Settings>Input everything seems to be alright. So sadly I'm a bit stumped on this.

    I've attached two images to you what I mean when it comes to the error codes as well as the Inspector for the InputManager.

    Thanks again for your help so far!
     

    Attached Files:

  3. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Cool, I'm glad we got the first part figured out!

    It looks like it's looking for an input labeled "Submit" as opposed to "Player0Submit." Offhand, I'm not sure why, but my best guess is that this is also related to Unity's weirdness with updates -- the "Submit" thing might be a holdover from an older version. If you add a new input and simply call it "Submit", does that fix it?

    For the melee attack firing, on the component for the Attack itself, under the Input field, what's the Button set to for each attack? (The way this is set up also changed in a recent version, so that could be why)
     
  4. CupOhJoe

    CupOhJoe

    Joined:
    Dec 27, 2017
    Posts:
    5
    Well, I tried duplicating the Player0Submit and just renaming that to Submit, but Im still getting the error. As for the attacks, they're labeled as G and T. Which I remember were the case on older builds, and I tried just switching one of them to "F", but "G" still does both attacks.

    So I'm not positive on the best steps forward with trying to clean up the Console editor.

    Sure it goes without saying, but seriously thanks for being so active on this thread and my problem!
     

    Attached Files:

  5. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    For the attacks, I mean on the Attack component itself; I've attached a screenshot that shows you where I mean:



    You can choose to set the input to Primary, Sub, Sub_2, or Sub_3. Those should correspond, respectively, to Player0Fire1, Player0Fire2, Player0Fire3, and Player0Fire4. (I added two additional inputs in a recent-ish update, which is why this changed from how it was before.) You should be able to set each attack to use a different button that way.

    The "Submit" button thing is particularly weird, because that's just a generic Unity error specifying that it wants there to be an input named "Submit", so if you added that, it's pretty strange that it's still saying it can't find it. If you click on one of those red errors, it should show you where specifically the error is coming from in the field underneath the console errors. Can you send me a screenshot of that? That might give me more info to go on.
     
  6. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    521
    Rex looks amazing! I'd been ear-marking Corgi for getting on sale, but Rex looks like it might be geared up for Mega-Drive/Snes/Master System games even moreso. How are Sonic Physics with this? I know it's a lot to expect from any engine since Sonic physics seem to be so detailed.
     
  7. CupOhJoe

    CupOhJoe

    Joined:
    Dec 27, 2017
    Posts:
    5
    Welp, totally embarrassed to say I don't know why i didn't check that! Doing that fixed the issues with the melee and shoot so thank you! As for console issue, the submit button got fixed, but now it says "cancel". I've attached some screen shots on the Input Manager with the Console errors, as well the Inspector when I double click the error.
     

    Attached Files:

  8. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Thanks for the kind words! It means a lot to me. Rex definitely does a deep dive into a lot of those classic game mechanics. I'm a huge sucker for the 16-bit era, and Rex is my love letter to that.

    Sonic physics are tricky. There's some really interesting documentation out there on the internet that I nerd out over from time to time. At the moment, Rex can do Sonic's sense of momentum, but it doesn't have loops or wall-running. Rex also has bouncing on enemies built-in, though!
     
  9. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Ooooh, that last screenshot is super helpful! So it looks like those errors are coming from your Event System, and not from Rex. That Standalone Input Module component you've got in the Input_Button_Cancel_Double_Click.png is looking for buttons labeled "Submit" and "Cancel." Since it's not Rex-related, it wants inputs simply labeled "Submit" and "Cancel" without the "Player0" prefix (although Rex itself will still be looking for its own "Player0Submit" and "Player0Cancel" inputs, as well.) I'm not sure what specifically you're doing with that Event System, but I suspect it'll clear up if you add both a "Submit" and "Cancel" key to the bottom of your Input Manager settings.
     
  10. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    @CHEMAX3X: Sorry for the delay on this, but the projectile-hitting-slopes thing should be resolved now! On the RexPhysics component of your Projectile, open Advanced > Slopes and turn on Enable Detailed Slope Collision. Then, set the projectile's Destroy On Terrain Collision to be destroyed on all four sides, and it should now properly work with slopes.
     
    tiz777 and CHEMAX3X like this.
  11. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    521
    It would be great if you ever plan on doing a Sonic demo with some matched physics! I'd be happy enough if it could handle Sonic 8-bit physics (no loops until fake loops on sonic chaos, just rolls and acell/decell mostly) which I think Rex looks like it can already? I understand Rex isn't explicitly designed for tilemap support, has this changed recently?
     
  12. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Rex can definitely do the acceleration and deceleration. It doesn't have a roll at the moment, although it's all open-source and it's designed to be easy to extend, and all the components are there.

    Rex will play very nicely with Unity's TileMaps. The way it's set up, you can treat certain layers as solid or not; by default, anything on the "Terrain" layer is considered solid, so as long as something has a Collider2D and is on the Terrain layer, it'll work with Rex. That includes Unity's TileMaps, third-party plugins like Ferr2D or Super Tilemap Editor, or pretty much anything else you can think of. (Rex doesn't include any TileMaps out-of-the-box, since I publish it in Unity 5 to ensure that the largest number of people are able to use it; they're very easy to set up, though!)
     
    Zebbi and CHEMAX3X like this.
  13. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    Hey, thanks for the reply and no problem, i've been very busy sketching and with some art, that's why i haven't been here pissing you off with my annoying presence xD....

    Awesome, now it's working, thanks for the help as always ='D
     
    Last edited: Aug 29, 2018
    clammy2017 likes this.
  14. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    Btw @BeeZee quick question, i bought a course on Udemy to create an advanced character controller, and the jump state there is really good, simple yet responsive and it's all that i need, with Rex i can't make it work as i wish, the jump there (in the course) works according as how long you press the jump Button, with Rex you have Min and Max frames for a jump, but i don't need that (currect me if i'm wrong) and it's not working as i want, for example in that course if i press the jump button for a short amount of time i will have a short jump, and if i press it a bit more i will have a longer jump and so on, it's very responsive, with Rex i can't do this (maybe i'm doing something wrong or maybe Rex jump wasn't designed like that ?)the min frames give me a short jump that has the same height always no matter if i press less or more the jump button, and the same happens with a long jump also it gives me a way too vertical jump arc that doesn't let the player move horizontally while in air, for example if i want to avoid a hole, i need to make the jump almost at the edge of a platform to pass that hole and land at the edge of the other platform, ummhh i gues it's confusing, so i will show you x) :

    jump.jpg

    I want to do something like this with Rex :

    resjump.gif

    I'm checking the Code, specificaly "JumpState" and "BaseJumpState", figuring out how you make the jump, to replace/add this lines of code:

    Captura de pantalla (663).png



    Thanks again for all (=
     
  15. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    So, we covered a lot of this via PM, but if you're looking to integrate your own jumping code into Rex, I recommend looking at line 211 of BaseJumpState.cs, which is the line that applies physics adjustments:

    Code (CSharp):
    1. controller.slots.physicsObject.ApplyForce(new Vector2(0.0f, adjustedSpeed * controller.GravityScaleMultiplier()));
    (This is on the new version 1.34 -- it might be on a different line on previous versions, but the text of the line should be the same as what's shown above)

    Here's a quick explanation of the jumping physics in Rex for anyone else interested:

    In Rex, your character jumps up by a static height for as long as you hold the jump button down. This is patterned after games like Castlevania, Mega Man, etc. -- it's the most common type of sidescroller jumping.

    Min and Max jump frames define the potential height range of the jump.

    • If the jump has a Min Frames of 5, that means the jump will *always* ascend for at least 5 frames, even if you only hold the button down for less than 5 frames
    • If the jump has a Max Frames of 12, that means the jump will stop after 12 frames, no matter how long you hold the button down.

    This means that the jump has a potential variance of 7 frames, depending on how long you hold the button down. So the bigger the difference between your Min and Max frames, the more variability your jump height can have.
     
    CHEMAX3X likes this.
  16. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    521
    I'm not 100% familiar with Unity's tilemap handling, or tilemap assets, but would this involve needing a separate tilemap for jump-thru's and solids? I've had trouble with other engines treating tiles as specifically jump through tiles or solid tiles. There's also usually a bug whereby if the height of the player exceeds the overlapping height of two or more stacked jump throughs, the player passes straight through. How are these situations handled? Thanks for the quick replies!
     
  17. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265

    Of coursr i know we were talking about this before, and i did what you suggested me, but still, is not the behavior that im looking for, so i will try to make my own custom jump.

    Thanks for the help as always =D

    Btw !! I know it can be annoying u.u, but any info about the advanced AI system =O ?
     
  18. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Yeah, Unity's TileMap system seems to have weird issues with terrain where you can pass through the bottom. I'd recommend using TileMaps for solid terrain, and then just using regular BoxCollider2D's for anything that lets you jump through the bottom.

    I hadn't encountered the issue with passing through stacked pass-through colliders before, but on testing, it looks like that can indeed be an issue! I'll make a note to look into it at some point. Thanks for pointing it out to me. In the meantime, I think I'd just recommend avoiding those situations in level design.
     
    Zebbi likes this.
  19. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    It's coming along nicely! I'm pretty excited about it; I'm just trying to take the time to get it right.
     
    CHEMAX3X likes this.
  20. RainbowWhale

    RainbowWhale

    Joined:
    Feb 25, 2018
    Posts:
    37
    Can add the ability to set animation for bounce off the wall? Because now my hero jumps off the wall with his face)
     
  21. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    Hey @BeeZee, so i'm facing 2 issues with Rex, idk if they are bugs or something:

    the first one is related with an air attack, that the player can only execute while jumping, but the problem is, if you press the hit button when the player is falling and almost touch the ground, the attack animation is played only for that amount of time (the last frames of the falling before touching the ground), here is the example and a screenshot of the air attack settings :

    airattack.gif Captura de pantalla (716).png

    And the second one is related with oneway platforms (As a note, i'm using tilemaps), for some reason if i place 2 oneway platforms, one above the other, the player passes through the one at the top normally but the one bellow it's totally ignored like it if has no collider, and if the player hits the ground comes back to the platform below, it's still not working, only the one above.

    I even tried putting solid terrain then the oneway platforms, but still the same result:

    oneway1.gif oneway2.gif

    Thanks again (=


    *EDIT* the Oneway platform problem only happens with tiles, if i use sprites it works perfectly fine
     
    Last edited: Sep 3, 2018
  22. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    So basically, a specific animation that only plays for wall-jumping but not regular jumps? This is something I've been planning to include soon, along with the ability to make wall-jumps go at a different height from regular jumps.
     
  23. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    The one-way platform thing seems to be a weird issue with TileMaps. I haven't found a solution for it yet, so in the meantime, I'd recommend just using sprites for one-way platforms -- you should still be able to use TileMaps for everything solid.

    Regarding the attack, thanks for screenshotting your attack settings -- that's really helpful for debugging. I just created an attack with exactly the same parameters you've got set up here, and I'm not experiencing the issue. I can jump, attack just before landing, and the attack still continues to finish even after I land.

    Your attack itself (i.e. the slash) is baked into your character's animations, right? So there's a single AnimationClip which has the player swinging their arm and the slash effect is baked into that, as opposed to having a separate AnimationClip for the player and another one for the attack? That might explain it, if so -- it could be that the Landing or Default animation of your player is overriding the attack animation, which would explain why it makes the slash disappear in your case but not in mine (since they're separate on mine). I might check to see that you've got an AnimationClip slotted for the Attack under Actor Animations > Standing; that might solve the issue. If not, it might be safest just to separate the slash and the arm swing into separate animations.
     
    CHEMAX3X likes this.
  24. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    Thanks for the answer, i'm experimenting another weird issue with tiles as a terrain, if i place a lot of them like platforms in the scene and the player jumps, from time to time it can pass through them like if they had no colliders, but i'm using tiles just for prototyping, so they won't be there for sure.

    Do you mean to add a stading animation for the air attack ? or to remove it if i have it ?, well i did both and it didn't work, i'm experimenting a similar issue with a projectile attack being canceled by the landing animation... so i gues i will make separated animations then.

    Thanks again for the help =D
     
    BeeZee likes this.
  25. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Here's a video I've been wanting to do for a while! Want to extend Rex Engine's code and build off of it? Here's an introductory guide. Enjoy!

     
  26. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    Wow just wow, i'm creating my own enemies from scratch and this video will be really helpful, to use Rex features such as heath and damage among others, thanks a lot for sharing =D
     
    Last edited: Sep 14, 2018
    BeeZee likes this.
  27. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Awesome, glad it helped!
     
    CHEMAX3X likes this.
  28. RainbowWhale

    RainbowWhale

    Joined:
    Feb 25, 2018
    Posts:
    37
    Can you make a videotutorial for creating text messages and dialogues? And the way customize it.
     
  29. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Sure thing. It might take me a little time, but I'll plan on it. In the meantime, the Demo_1 scene has a pretty good example on the far left side that might be useful to you.
     
    CHEMAX3X and Bagnol like this.
  30. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    It'd be great if you can add to that tuto how to use the dialogue system with NPCs (=
     
  31. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    Hey @BeeZee , i have 3 requests, or at least tips on how to do them, they are just transitions :

    The first one,similar to Castlevania games, when the player is moving and it stops, i don't want it to stop suddenly, i want to use an animation, or reduce the speed/frames and then stop, like this :

    transition.gif

    The second is the same, but now, changing directions ,let's say the player is walking to the right and suddenly it walks to the left, i want to do something similar to the one above, to stop the player and then turning it to the other direction,similar to Symphony of the night.

    And the third one, to have turning animations for different states, now you can only put one, let's say you put an idle one, but if the player's running animation looks totally different than the idle one,let's say the player has the arms up, or a different face expresion, it will look weird that transition,i.e, running animation,with happy face --> idle turning animation with sad face --> running animation,with happy face, so it will be good to have a turning animation for the run state, which will be the same but just looking to the camera, the same as jump and landing states.

    Thanks again (=
     
  32. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Those sorts of intermediary animations are something I've wanted to do for a long time, so it's good to know other people would like them, too! They're something I'll keep in mind for the future.

    There are a few slots for turning animations at the moment, on RexController under Turn Animations. There's Ground, Air, and Crouch, which will all accept different AnimationClips for those states. I do eventually want to add more -- possibly on a per-state basis? One of my primary concerns if I do that is keeping everything clean and avoiding making the Inspector feel bloated, so that's all stuff I'll keep in mind.
     
    Lars-Steenhoff and CHEMAX3X like this.
  33. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Just in-progress AI things.

     
    smika78x, Bagnol, FunkyBuddha and 2 others like this.
  34. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,525
    cool, reminds me of playmaker
     
  35. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    Awesome, can't wait <3
     
  36. wtbuchanan83

    wtbuchanan83

    Joined:
    Mar 6, 2018
    Posts:
    10
    Hey guys! I'm sorry I've been so quiet the last few months but I was deep in the development trenches. But I just wanted to let you know that my game made with Rex just released on Steam today in Early Access. My first ever! Still doesn't have the completed story or boss elements, but wanted you guys to be first to know and see what's possible with Rex.
    https://store.steampowered.com/app/883810/Nocturne_of_Steel/
    CapsuleSm.png

    @BeeZee Thank you so so so much for this wonderful engine. I took a hunch on it back in May and when I saw what it was capable of and how easy your scripts were to learn from, I just took it and ran with it. Hard. It played a crucial role in helping me achieve what was for all my life just a dream. You're awesome and your help on these forums was invaluable. Again, my deepest gratitude.


    Noc01.png Noc06.png Noc10.png
     
    BeeZee, smika78x and CHEMAX3X like this.
  37. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    Awesome, congrats on your release, the games looks like pure fun to play =D
     
    Last edited: Oct 5, 2018
    BeeZee and wtbuchanan83 like this.
  38. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    This is awesome! Seeing this made my week. Congrats on your launch! I'm definitely getting some Rondo of Blood vibes from that sunset village screenshot. Would it be cool if I post about your game in the Made with Rex section of my website that I'm working on?
     
  39. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Heya all, just wanted to let you know that I'm making tons of progress on the AI system, and it's getting closer and closer. It's taking a bit longer than I'd hoped, but I'm super excited about the end result (although I worry that I'm basically putting myself out of a job. I kid. Kind of?)
     
  40. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265
    If you need a beta tester, i'd be glad to help (=
     
    Last edited: Oct 5, 2018
    BeeZee likes this.
  41. wtbuchanan83

    wtbuchanan83

    Joined:
    Mar 6, 2018
    Posts:
    10
    Oh, please do! Get the word out. I have a rather small credits sequence in the game, but I made sure to give Rex a nod inside of it. :3
     
    BeeZee likes this.
  42. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Awesome, I'll take you up on that once this is almost ready! Much appreciated.
     
    CHEMAX3X likes this.
  43. Pad_Fou

    Pad_Fou

    Joined:
    Sep 3, 2018
    Posts:
    7
    Hi BeeZee,

    I am currently working on a game with your game engine. I already posted on this forum a few months ago and a reiterate what i said : you did and still do a great engine.

    However i have some issues with slopes.
    -I would like to have ennemies that turn on wall contact and on ledge contact. Your engine allow both of them, that's great. However if "turn on ledge contact" is checked, ennemi will ascent slopes but will not be able to descent them. It should be great to be able to select the slope angle that an enemy can ascent or descent. If it is already possible (maybe i missed something) i would like to know how to do it.
    -Another issue is that PhysicsMover script does not work with slopes (or i did something wrong). I would like to do a steep slope that player cannot ascent and that will force uncontrolled descent if player goes on it. I tried with a simple "Ice" script and it's not working either on slopes.
    - It could also be great to select the maximum slope angle that a player can ascent. And to be able to increase/decrease the player's ascent/descent velocity depending on the slope angle.

    PS : Can't wait to see what you did with AI :)
     
  44. Paerux

    Paerux

    Joined:
    May 13, 2013
    Posts:
    3
    Hey, I'm using the engine, I remember someone saying when you press dash and jump at the same time you get a long jump. I'm having the same thing. I don't know how to fix it. I tried playing with every setting combination in dash & jump state.

    Side question. I'm a big fan of megaman series. I would like to replicate megaman 2 in unity for fun. Is there anything I can't do with Rex?
     
  45. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Thanks for the kind words! It means a lot to me.

    For the slopes:

    • I plan on fixing the enemy-turning issue in the near future. As part of the upcoming new AI updates, I'm working on a much more robust movement AI, and that will include options for whether or not an enemy counts slopes as ledges when it does its ledge detection (and what grade of slope.)
    • PhysicsMover (and stuff like ice) isn't built with slopes in mind at the moment. I've had a couple requests for sliding down slopes, so it's something I'll think on and consider for the future!
    • Maximum slope angle is also something I'd like to consider. I've done some experiments with it in the past and I was never really happy with the results, but I'll probably continue to tinker with it. I'd love to get it working.
     
    Pad_Fou likes this.
  46. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    What version of Rex are you on? I remember that issue, but I had fixed it (to the best of my knowledge) in a more recent update. Dash State has a checkbox called "Is Canceled By Jump" which should disable the long jump if it's checked.

    Mega Man 2 is awesome! I just got really into Mega Man 11 earlier this month -- I'd say it's a great comeback for the series after its hiatus. I liked it so much that I think I want to go after the platinum trophy for it when I have more time.

    Off the top of my head, the biggest hurdle using Rex out-of-the-box for a recreation of Mega Man 2 would be getting the boss fights to work. You could do them pretty easily with some mild scripting, but the upcoming AI update will go a long ways towards letting you build them straight from the Inspector. There are also probably some stage gimmicks here and there that you'd have to script yourself, like the disappearing blocks, and there are some weapons you'd have to script for yourself, like the rotating Leaf Shield. All of that said, Rex should also provide a good foundation for it, and all the tools are there if you're willing to script a couple things.

    (Sidenote, I've toyed on and off with the idea of putting those appearing and disappearing blocks directly into the engine. The biggest thing holding me back so far is knowing that most people hate them. I came really close to releasing them as an April Fool's update this year!)
     
  47. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Here's another look at the upcoming AI stuff! This image shows a simple conditional branch:



    This goes on an enemy. If the enemy is within 10 distance units to the player, it'll use its melee attack. If the player is further away, it'll fire a projectile instead. All of this is 100% in the Inspector, with no extra code. (You can make these much more complex, too!)
     
    Pad_Fou, CHEMAX3X and FunkyBuddha like this.
  48. CHEMAX3X

    CHEMAX3X

    Joined:
    Jan 8, 2018
    Posts:
    265

    Wow, can't wait *__* !!!
     
  49. hodgepodge2022

    hodgepodge2022

    Joined:
    Mar 8, 2015
    Posts:
    19
    Would you also be able to do stuff like: "Have enemy go into a "chase" state when the enemy sees the player or mimic a thwomp?
     
  50. RushingEntertainment

    RushingEntertainment

    Joined:
    Sep 28, 2018
    Posts:
    16
    Hey beezee, love your asset. It helped us a lot. However, Im having trouble with the collision detection, we changed the collision detection in the rigidbody (of the player) to continuous because sometimes when the player gets hit and knocked back it runs off the colliders of the platforms. This kind of solved the problem but it still happens from time to time. A few considerations to take on account are that im using tilemap colliders and that, the colliders from the player are on top of each other. I mean, the box collider of the player and the box collider of the controller are on the same spot.