edited September 2014 in ORK Support
hello, i got the enemies to spawn in real time and everything, and they spawn on the ground. the only problem is if they come into contact with a hill or something like it that makes the terrain higher than they are they simply fly through it. im confused because i have terrain colliders on all my terrains. do i need mesh colliders on them as well? cause i tried mesh and it doesnt work either.

basically im spawning in some goblins but they have no gravity or collision. any ideas? thanks again. i did check the tutorials several times and this has confused me. thanks
Post edited by gamingislove on
  • Did you add colliders to your enemy prefabs?
    E.g. a CharacterController ...
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • im confused as to how you can add components or things to prefabs that have been spawned by ork, since they dont exist till the game runs.. its really confusing me. and i didnt see this in the tutorials...

    like, the goblins spawn after the game is already running so how would i apply a character controller or some other component to it? thanks.
  • edited September 2014
    Ork spawns prefabs of your monsters.

    Generally you can set up your enemies like this----place the prefab of your enemy in any scene.

    Let's say you have a monster--a dragon -- move its prefab into any scene. Then add a component character controller to that dragon. And make sure it fits snugly.

    Create a prefab somewhere in your Assets---I have a folder for Enemies.

    Slide that dragon with the character controller onto that prefab.

    Now that is the prefab you'll use for your enemy---say Fire-breathing Dragon.

    And ORK will spawn it with its character controller already set up.

    Post edited by Catacomber on
  • edited September 2014
    I edited my post. : ) Look at evil pants in the tutorial resources--he's really just a prefab but he was undoubtedly set up by moving his prefab--basically a graphic with animations into the scene --adding a character controller to that--making it fit around him right and then sliding that back onto his prefab. And then ORK will spawn that prefab of him that you've adjusted.

    You can make the width of the character controller a little bigger if you need to.
    Post edited by Catacomber on
  • edited September 2014
    There are two types of prefabs in Unity--the prefab of your monster or hero. The graphical creature that has animations.

    You usually have to do something to that to add a physics element--a character controller so it can use its animations and collide properly with things. You do that by putting the creature in your scene so you can add things to it.

    And then you make your own prefab that will be your hero or enemy call it whatever name you want to and slide that enhanced prefab you added things to that's in the scene onto yours that you'll use for your monster.

    So for example I have my Cremuss' skeleton mage purchased from the asset store. It has no controller.

    It's just a prefab with animations.

    So to add a character controller to it so I can use it in ORK, I place it in any scene--add component physics Character Controller.

    Then I make a prefab--Create prefab--it's empty I name it Bone Mage. It's white until I slide a monster prefab from the scene on it. That's going to be the monster ORK spawns.

    And I slide the guy in the scene with the character controller onto that prefab so it now turns blue. And that's what ORK will spawn if I slide the Bone Mage prefab onto my enemy in ORK Framework Combatants/Combatansts---Bone Mage.

    You need to look a little more into how Unity works but you can pick it up fairly quickly if you get some monster prefabs. None of them will have a Character Controller most likely. They all need a Character Controller to play their animations and to collide properly.

    Put them in a scene and add the Physics component Character Controller.

    Now create a prefab and call it Scary Monster and slide that monster you put into the scene onto that empty prefab.

    Trying to say this in as many ways possible. : )
    Post edited by Catacomber on
  • pretty sure i got it working never mind. thank you.
  • just saw your post catacomber thanks for typing all that! sorry that i already got it working. i figured out that if you put the model in the scene, apply a component then drag it from teh heirarchy into a folder that it will maintain the components when it spawns them. thanks though! :)

    btw i recently saw your showcases they look nice from the screenshots so far! :) nice work.
  • edited September 2014
    Your thanks are worth all the typing. : ) Thanks very much.

    Glad you got it working!!! ^^

    Usually people have similar problems so hopefully someone else will benefit. : )
    Post edited by Catacomber on
  • the only thing i am kinda confused at now is how to get different animations to play at different times. such as running when hes going faster. i can get him to either run all the time or walk all the time, but not both.

    so like walk when speed is 1 and run when speed is 3?
  • Depends on which animation system you're using.

    The legacy animations are featured in the game tutorials, e.g. tutorial 3 about adding the player explains the basic move animations, and tutorial 20 goes into detail about different animations for attacks, etc.

    A mecanim example can be found in this gameplay tutorial.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • well its kinda weird, cause i just wanted to use whichever system was better/easier, but at the moment i think i am using the animator somehow for animations, because when i edit the animator it works. however the system is using legacy because when i try to hit mechanim it gives me an error and i read from some google searches i think it has to be on legacy or you get an error. which is weird because doesn't animator work with mechanim animations not legacy?

    basically i want to have the animator go from idle on the goblins to walk when periodiocly, then go to run when they see me and chase after me. right now they can do 1 animation and when they chase after me it looks weird if they are walking or idle but chasing after me.

    thanks, i did look at the tutorials several times but i still cant get this, iv spent hours trying to get it to work. sorry its probably something obvious again but again i am very new to this. thank you.
  • I have a question about this too but am going to ask it in my own thread. : )
  • wtyson answered my question how to do this. I hope this helps you. Not sure if you can use the animator with Legacy animations. I use Legacy animations no animator. My skeletons hunt and kill me now.
  • im very confused because im pretty sure i have already tried legacy but it didnt work, ill try again though. how did you set yours up in legacy? i have all the animations and whatnot but how do i assign the different animations to different points in time, like walk animation when speed is 1 and run when speed is 3...
  • You use a run animation and if you don't have one use the walk animation set to 3 or 6.
Sign In or Register to comment.