|
Hey guys i need help. I am making a game where a robot chases the player(you) and tries to kill it and you kill them like a zombie game. So here is the problem the robot in unity are not realy solid. They can walk on the floor but they go through walls, when they walk helf of there body is in the ground, and somehow they can fly when i am on a object. If you can help me with any of these problems that would be great. Thanks
(comments are locked)
|
|
hey skully42, seems like a few people are berating you on here. to answer your what do you want me to do. refine your question.. what have you tried? have you coded any scripts? if so what are the scripts? are you attempting to use collision? was the enemy made in a software application such as 3ds max or maya? if so did you put a mesh collider on it? these things help us help you. telling us everything you've done will help us find a quick solution to your issue. from what i have read it sounds like you have a enemy that has no rigid body or box collider on it so it doesn't do any collision detection. i didnt change or rewrite a script i used the enemy from unity and it can walk on the floor but half or its body is in the ground and i tried putting a collider and a rigidbody and it just falls through the floor i have no idea what to do now i am new to this if you have any questions just ask and i will get back to u as soon as possible
Feb 24 '12 at 07:20 PM
skully42
Well, then you can just move the enemies y position up above the floor, so it doesn't fall through.
Feb 24 '12 at 07:34 PM
MithosAnnar
agreed with mithos, just move the enemy up until it is above the ground then it shouldn't fall through. i usually set the Y to like 1.5 or 2 and let gravity bring it to the ground, if there isn't gravity then i would manually position it.
Feb 24 '12 at 07:36 PM
kievar1983
maybe i wasnt clear and i am srry for that they dont fall through the floor but as the robots start to chase me half of their body is in the floor
Feb 25 '12 at 01:35 PM
skully42
ok, so copy and paste the 'chase' code underneath this comment.
Feb 25 '12 at 01:43 PM
MithosAnnar
(comments are locked)
|
|
http://answers.unity3d.com/questions/229317/enemy-rigidbody-not-responding-to-gravity.html This link fixed an identical problem for me, in your enemies following script place it right under the "function Update(){", it might solve it for you
(comments are locked)
|
|
Ok, not to fear there skully. And don't worry about the format its fine. Attach this script to your robots: chase.js: If I got something wrong or you received an error tell me cause I haven't tested it.
Feb 25 '12 at 08:32 PM
MithosAnnar
no errors but i didnt get a change what was it supposed to do
Feb 26 '12 at 12:04 AM
skully42
So they still fell through the floor?
Feb 26 '12 at 11:20 AM
MithosAnnar
Try putting a box collider on your floor.
Feb 26 '12 at 11:21 AM
MithosAnnar
no no no they dont fall through the floor its just half of their body ends up going into the floor while it chases me
Feb 26 '12 at 03:47 PM
skully42
(comments are locked)
|
|
http://answers.unity3d.com/questions/206576/enemy-problem.html http://answers.unity3d.com/questions/211889/enemy-help.html http://answers.unity3d.com/questions/220382/solid-enemy-help.html Maybe stick to just asking the question once and revisiting it? Plenty of people have offered advice already, maybe you should look more into that before asking again and again? i tend to find people answer the questions that havent been answered the other one didnt get a answer in a few weeks
Feb 24 '12 at 01:35 AM
skully42
To be fair, that's because it's a vague question that exhibits no knowledge of game design, no knowledge of Unity, and no use on your part of the Unity manual, and so the answer required to satisfy your needs would end up spanning across a small novel. You need to learn to write your own scripts, first off. Saying "Hey guys there's a problem with a script I didn't write because I have no programming knowledge" is pointless, because even if we gave you code to fix it, you would learn virtually nothing, thus you'll be back here every single time you have a basic question. Unity is not a game engine where you can "click together" a game (or even a working demonstration) without any technical knowledge whatsoever, and too many people come here to learn that the hard way.
Feb 24 '12 at 02:04 AM
Jason B
so what do you want me to do
Feb 24 '12 at 03:05 PM
skully42
(comments are locked)
|
|
:) did you adjust the character collider ? - on default it is usually not set to fit your character. Click on your Enemy in the hierachy - and look up its character collider - set the y value a bit higher.. and make sure most of your character is surrounded. That should stop your enemies from walking through the floor and foor the rest... idk :) Cheers Kerg. i already did that but thanks for the help i guees
Mar 11 '12 at 02:13 AM
skully42
(comments are locked)
|
1 2 next page »

Can you post the code for your enemy movement and collision? It could be a number of issues depending on your implementation
everything is in unity i didnt chnang or write my own script
Well theres one problem
Oh okay. Given that information, I quantum leaped into your body, assessed the situation, performed a good deed and leaped back into my own. I can tell you that everything is working as it should--robots are supposed to sink into the ground and be non-solid by design (as of Unity 2.6). Good job!
do you want the script if so which one