I'm having an issue using the fight in a different scene tutorial. The main problem is a lack of consistency with the issue, which leaves me confused on where to start. Basically, I find my characters often in the wrong position, either floating or sunken into the battle arena. But this isn't always the case, sometimes (without changing any settings) they will end up positioned exactly where I want. There is no pattern from what I've seen with it. I've seen discussions on this with other people having the problem, but none of the solutions have helped me. I've tried using place on ground in battle spots in the battle menu, I've tried adding a place on ground component. My prefabs are set to 0, 0, 0. It happens to both legacy and mecanim characters.
If they are floating or sunken, I've found using the attack animation sets them back on the ground properly, which makes things further baffling.
Another issue I'm having is when the player character returns to the previous scene, they will very slowly start to shift back into their fighting idle even though the battle is over. I'm using mecanim animations on this character, with battle animations. If I begin running around again they will return to their normal idle, but I can't figure out why they want to shift back into their fighting idle upon initially returning to the starting scene in the first place.
if it's any consolation, i've been using ORK for a few weeks now, and i've experienced various flavours of the "floating on air/sinking in ground" problem too
my current configuration, which works for in-situ, as well as new screen battles (but which i can't guarantee will work for everyone, depending on... factors), is:
> all my animations are Mecanim
> all my character prefabs have an Animator and a Character Controller component, and nothing else (apart from an extra Event to fix another flavour of floating problem which i've been having with multiple Group members, but this should be irrelevant with regard to the basic floaty/sinky thing)
> all NPCs have some variety of Movement AI set in their AI Movement Settings
> all MoveAIs have a Component Type of "NavMeshAgent", and "Add Component" checked
> obviously, because of the above all relevant scenes have to have a valid Unity NavMesh defined
> i have "Place On Ground" DEselected in "Battle Spots". if i have it selected i usually start the battle with both combatants floating above the ground
i don't think i've got any other pertinent settings, and as i say, that works for me. at the moment
i'm not using battle animations yet, so i can't help with regard to that one (if, indeed, i've even helped with regard to this one...)
I haven't messed with NavMeshAgents yet, but I will definitely look into this. Right now I'm managing to get things at least looking right by disabling 'Place On Ground' and setting the characters Y positions to at -1. Don't know if this will cause issues with other battle arenas as I add them, I'm assuming not as long as the floor is at the same place in every scene. But you never know.
This is one of those things where I'd love to know what's going on under the hood that causes such odd positioning with 'Place On Ground.' It is nice to know I'm not the only one bumping into this issue.
Still completely stumped on my character going into a fight idle upon returning to the scene though, gonna have to do more experimenting with that one. Thanks for the response!
Place on ground uses raycasting to find the ground - naturally, the raycast will find the first collider (even triggers) that can be raycasted and is on the layers the raycast will check. For battle spots, the raycast will be sent from the battle spot, i.e. having them with a higher Y value (e.g. 5) will ensure them to be above the ground, unless your battle arena (Battle component game object) is far below the ground).
In battles in another scene, the battle arena will be placed at the spawn point, and that also determines the position of the battle spots - which will afterwards use raycasts to find the ground. You can also use the Place On Ground components on your combatant prefabs to have them be placed on ground upon spawning :)
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!
Edit: I once said that the navmesh fixed the issue, i was wrong. I am still receiving random placement, and it depends on where each person is facing when before the battle starts.
i tried 3 different "place on ground" scenarios: on spawn point, on combatant, and in battle spots. all 3 leaves either the player or the enemy up one unit.
Alright, can you send me a test project to contact@orkframework.com? I think it'll be faster if I just take a look at it :)
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!
After testing the project, the issue is that the battle spots are set up wrong: - Place On Ground isn't used - some of the spot's Y coordinates are below 0, i.e. usually below ground level.
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!
I sent this to you via email but I dont know if you received it
I forgot to change the battle spots back. I placed Y at 0 after the Y at 5 did not work. I also removed "place at ground" and tried it using ork scene wizard instead.
also, I forgot to add that the Y changes depending on how you are facing when the solder catches you. sometimes it will work if you run straight ahead but if you move slightly or run away the Y acts up again.
you sent a tip about changing the ground tag. I'll try that to see if it helps.
There was an issue where the battle spots could be placed before the actual battle object is placed at the spawn point when fighting in another scene. Fixed in today's ORK 2.6.1 release.
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!
my current configuration, which works for in-situ, as well as new screen battles (but which i can't guarantee will work for everyone, depending on... factors), is:
> all my animations are Mecanim
> all my character prefabs have an Animator and a Character Controller component, and nothing else (apart from an extra Event to fix another flavour of floating problem which i've been having with multiple Group members, but this should be irrelevant with regard to the basic floaty/sinky thing)
> all NPCs have some variety of Movement AI set in their AI Movement Settings
> all MoveAIs have a Component Type of "NavMeshAgent", and "Add Component" checked
> obviously, because of the above all relevant scenes have to have a valid Unity NavMesh defined
> i have "Place On Ground" DEselected in "Battle Spots". if i have it selected i usually start the battle with both combatants floating above the ground
i don't think i've got any other pertinent settings, and as i say, that works for me. at the moment
i'm not using battle animations yet, so i can't help with regard to that one (if, indeed, i've even helped with regard to this one...)
This is one of those things where I'd love to know what's going on under the hood that causes such odd positioning with 'Place On Ground.' It is nice to know I'm not the only one bumping into this issue.
Still completely stumped on my character going into a fight idle upon returning to the scene though, gonna have to do more experimenting with that one. Thanks for the response!
For battle spots, the raycast will be sent from the battle spot, i.e. having them with a higher Y value (e.g. 5) will ensure them to be above the ground, unless your battle arena (Battle component game object) is far below the ground).
In battles in another scene, the battle arena will be placed at the spawn point, and that also determines the position of the battle spots - which will afterwards use raycasts to find the ground.
You can also use the Place On Ground components on your combatant prefabs to have them be placed on ground upon spawning :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
i tried 3 different "place on ground" scenarios: on spawn point, on combatant, and in battle spots. all 3 leaves either the player or the enemy up one unit.
Chillback Digital | web page | Itch.io page | Youtube Page | Made With Unity Page
I think it'll be faster if I just take a look at it :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Chillback Digital | web page | Itch.io page | Youtube Page | Made With Unity Page
- Place On Ground isn't used
- some of the spot's Y coordinates are below 0, i.e. usually below ground level.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I forgot to change the battle spots back. I placed Y at 0 after the Y at 5 did not work. I also removed "place at ground" and tried it using ork scene wizard instead.
also, I forgot to add that the Y changes depending on how you are facing when the solder catches you. sometimes it will work if you run straight ahead but if you move slightly or run away the Y acts up again.
you sent a tip about changing the ground tag. I'll try that to see if it helps.
Chillback Digital | web page | Itch.io page | Youtube Page | Made With Unity Page
Fixed in today's ORK 2.6.1 release.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!