1. Check which AI object falls through the ground.
2. Stop the app
3. Change the code to create only that AI instead of all of them
4. Make it so that on the first frame of adding the AI, game world will no longer get updated (pause the world)
5. Move your camera and investigate the position of the AI and its physical controller actor (Physics.draw)
My guess is that you're creating it partially under the ground?
i don t think it is created partially under the ground cause even if we made to create it 50 above the ground we could see it falling from the heaven and it also felt down through the ground... and why we don t know. we have one AI called crystal giant and he is the biggest one and he doesn t fall down through the ground and if we made others the same size we haven t any problem but because they are smaller they do..
I did try using different scale characters and I did have the same problem. I found a bug in the code for server spawn function that sets the initial position at a random y value. I fixed that and at first it looked much better. I needed to do a little more testing but didn't have time before I had to go to work. I hope to work on it more tonight.
What I actually think it is thought is a problem with the way we have collision set up. I think the big actors are actually "hitting" the little guys away and through the floor.
2) In Server.AI::Spawn() we never initialized the Y value of the position vector. As a result, it took random bits from the memory allocation and set it to crazy numbers. I have changed this 1 line to set Y to 0 then add the HM offset and it seems to have fixed it.
T.pos(Vec(pos.x, 0, pos.z)+Vec(0,y,0)); //Add Y so that it doesn't spawn just under the map
3) This is where the real bug is. There is something weird going on with the Random extern when using a Circle or Ball. If you look at the video below, you will see the issue. For now, a quick work around is to replace the line
Vec test = Position +=Random(RadiusBall,true);
with
Vec test = Vec(RandomF(-10, 10), 0, RandomF(-10, 10));
and setting position to Position += Vec(test.x, 0, test.y);
4) **Edit** sorry 1 more thing. I needed to add the following to the client Physics.ignore(AG_AI,AG_AI); because some physics collisions between the bigger and smaller actors were throwing the little guys through the floor. I also noticed that if the little guys ran into a static building (terrain), they would also fall through the floor. I removed the item they were walking into and indeed no more actors fell through the floor. I am not really sure how to prevent this and hoped somebody could comment.
(This post was last modified: 06-27-2013 08:24 AM by Ozmodian.)
(07-02-2013 07:08 AM)Ozmodian Wrote: bumping to look at the issue i reported with Random(RadiusBall,true)
Hi, do you mean a bug in the engine?
Last time I checked the randomizer for Ball and Circle worked fine.
There's even a tutorial in 07-Misc/Random which draws lots of random points in a circle.
You can also add this to the tutorial draw function: