Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


  • Content Count

  • Joined

  • Last visited

Community Reputation

4 Neutral

1 Follower

About Sanity

  • Rank
  1. This script makes ai fallow player : var player: Transform; function Start(){ player = GameObject.FindWithTag("Player").transform; } function Update() { GetComponent(NavMeshAgent).destination = player.position; } Now,how can i make AI RUN AWAY From Player. Just Run away from player with navmesh. I know i have to get player vector and then i have to make an Ai to move there. Or maybe there is an other option? Help me out smart people!
  2. Okay,so i have tried already before setting points manually,it kinda sucked,because when i want npc to panic when (i shoot with weapon or start to make chaos) i want it to run away FROM Player to opposite direction (Avoid player),but when points are set manually,it looks kinda strange,because sometimes npc chooses points which are towards the player. Thanks.
  3. Okay i give up,i have checked the iwhole nternet (unity answers,forum...) in 3 days and i haven't found ANYTHING USEFUL. So here we go: How can i make AI Run Away from me if i enter in "trigger" or "zone" or whatever,it doesnt matter what triggers it,but what matters is HOW it is done,what logic or strategy i need,to make AI Run away from player,avoiding obstacles on its way and then when player is not in sight ai stops and switches to idle state...whatever. Like in video games when npc are in panic they just run away from player... Actually i have very good knowledge in NavMesh,i have made my ai scripts very good and smooth,but to make them run away in random direction or .......... duhhhhh HELP ME OUT SMART PEOPLE!
  4. Hello smart people! Gonna make this quick so you can understand. 1. So I have made Mecanim character in Unity (all works perfect). 2. I want to edit/update my character model through 3ds max and then export it from 3ds max back into unity3d again (You know so that i can replace my old character with the new one i made/upgraded in 3ds max ) 3. So i have edited my character model and have exported (replaced) back in unity3d. 4. So now mecanim character should have new mesh and everything i had edited in 3ds max........ But the mesh and structure of my character has completely changed,its F messed up (deformed sizes,mesh looks different and when placing character in scene it somehow dissapears,basically its all F UP!) So i want to know,is there another way to edit MECANIM character mesh (maybe detach some parts from mesh,if needed) in Modelling studio (3ds max..) and then Successfully import model back in UNITY3D engine without any PROBLEMS. You smart people are my only hope. Please if you can,help me out,i will appreciate any help. Thanks!
  5. ITs on my level,BUT this not gonna help me.
  6. Hi smart people,i tried all methods,yeah all methods on this subject but they just cant seem to work for me,trust me topics out there cant help me,but you guys can! All i want to do is this : For my 3D character in 2D Space,character head,arm,gun fallows mouse position and when mouse gets over his head or over to opposite side,the whole character rotates to oposite side,just like in video. Edit: My head is full of sh*t right now,i already know that i have to do something like When the x component of the the position cursor is smaller than the x component of the player, i turn the player,something about angles,dunno!
  7. Hello guys. I really want to know answer to this question,i've been looking for the answer for almost week,but nothing! So,i thought that you guys could help me! So heres the thing,i have simple script,it creates primitives (cubes) and it makes cube grid. I need to make very,very wide cube grid,like 100x100 (about 10000 cubes are created). And of course it gives me alot,alot draw calls like 8 thousand +++ So solution would be to group created primitive meshes or just group them together to reduce draw calls. Or any other method!!!! See: for (var y = -100; y < 5; ++y) for (var x = -100; x < 5; ++x) { var cube : GameObject = GameObject.CreatePrimitive(PrimitiveType.Cube); cube.transform.position = transform.position + Vector3(x, 0, y); var MyCube:GameObject; var Size:Vector3 = Vector3(10,10,10); or function Start() { for (var x=-Size.x; x<Size.x; x++) for (var y=-Size.y; y<Size.y; y++) for (var z=-Size.z; z<Size.z; z++) { Instantiate(MyCube, Vector3(x,y,z), Quaternion.identity); } } } I need some method to group those primitives or something..... TO REDUCE DRAW CALLS! Thanks guys for your attention I appreciate any help
  8. Hi,this is script what i made,its controlled with raycast,when i press "e",object parents with player,so all works perfect when i press "e" ,BUT when i want to ungroup object from player,or just print("drop cube"); - (Press "e" button again),NOTHING is happening.....i cant press "e" button again to see action,it just does not work.... I just need to press "e" button again for further action.... I need you professional help guys,simple script but Big problem,so please help me out guys,thanks. var PickupObject : Transform; var PickupZone : Transform; var isHolding = false; var hit : RaycastHit; function Update () { var forward : Vector3 = transform.TransformDirection(Vector3.right) * 2; Debug.DrawRay (transform.position, forward, Color.green); if (Physics.Raycast (transform.position, forward, hit, 2)){ if (hit.transform.gameObject.tag == "Water" ) { if (Input.GetKeyDown(KeyCode.E)) { isHolding = !isHolding; } } if(isHolding == true){ PickupObject.rigidbody.useGravity = false; PickupObject.rigidbody.isKinematic = true; PickupObject.parent = PickupZone; PickupObject.transform.position = PickupZone.transform.position; //sets position PickupObject.transform.rotation = PickupZone.transform.rotation; //sets rotation print("Pickable Object : Water."); } else { print("drop cube"); } } }
  9. Sanity

    Game "Proteus".

    Hello guys,merry x-mas to everyone. So,i just wanted to know,if there is a way to make beatifull game terrain in unity3d,like in game PROTEUS : http://oyster.ignimgs.com/wordpress/stg.ign.com/2013/02/proteus_020413_1600.jpg Youtube : How to start? What to do? How to make SOOOOO amazing Pixel Art in unity? How to make everything so beautiful in pixels? I need some answers to these questions from you guys. Thanks for paying attention and also thanks before. Also there is another thread similar to this question : http://answers.unity3d.com/questions/588462/pixel-art-pixel-perfect-terrain.html
  10. I wish that i can give you multiple thumbs up!
  • Create New...