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.

bogdan123

Member
  • Content count

    37
  • Joined

  • Last visited

Community Reputation

0 Neutral

About bogdan123

  • Rank
    Member
  • Birthday 11/20/1998

Profile Information

  • Gender
    Male
  • Location:
    Россия
  1. Your project multiplayer kit modified OMA's fps kit.
    Hi, I stumbled upon your project via this link 
    http://armedunity.com/topic/5921-fps-kit-multiplayer-v03/
    Unfortunately it is impossible to download =(
    You can update the download link?
    Thanks in advance!

  2. Strange bugs with the car from the OMA's 2 FPS Kit 1.2 ! In General, I have 2 strange bug that I can't fix it! When I get in the car, sometimes the car begins to fly and turn somersaults in the air! Don't even know what it is =(. the second bug is that when I got in the car it is possible to observe a shift of the machine to the side (she slides sideways slowly) How to fix it? I have disabled the scripts on the wheels, then no slip car. Waiting for help! Thanks in advance!
  3. Browser I translate almost any text from English in Russian, by the Way, I checked your method, everything works as it should, thanks again for the help.
  4. I tested, looks good! I will translate the scripts into JS and test in your project and write in this topic how it went. Thank you for the help! I hope everything will work for me as I had planned.
  5. As I understand the first script performs a raycast role as I had also spawned our bullet. The second script(the engine) hung on the bullet and makes the fly sweep raycast ? I correctly understood?
  6. Yes I want the bullet was moving along the trajectory raycast
  7. We do not understand each other. I'm talking about bullet as on the effect, nothing more, I don't need to give her the interaction. On account of the damage to water and dirt I forgot to remove a line =) In General I need the bullet trajectory raycast. Here the interesting lines- //My variables var bulletspawn : Transform; var BulletParticle : Rigidbody; var powerbullet : int = 100; //My variables var clone : Rigidbody;//My variables var bulletP : Rigidbody;//My variables //What is written to spawn if(draw==false){ if(BulletParticle){ bulletP = Instantiate(BulletParticle, bulletspawn.position, bulletspawn.rotation); bulletP.velocity = bulletspawn.TransformDirection(Vector3.forward * powerbullet); } } //What is written to spawn It is necessary that the bullet that has spawn was flying on a trajectory raycast! Here's the pictures.
  8. Hello, I am interested in the question as you can well realize the effect of bullets flying in FPS Kit 2 1.2. I did spawn a bullet with a predetermined force, but the problem is that in the past that you need to consider the inaccuracy of the shooting created a raycast! I turned to shoot, a hole appears from the raycast in one place, and the bullet flew in another place. I want a bullet follows the trajectory raycast with his inaccuracy! Thanks in advance! Here is the code what //My variables var bulletspawn : Transform; var BulletParticle : Rigidbody; var powerbullet : int = 100; //My variables function fireOneBullet (){ var clone : Rigidbody;//My variables var bulletP : Rigidbody;//My variables //What is written to spawn if(draw==false){ if(BulletParticle){ bulletP = Instantiate(BulletParticle, bulletspawn.position, bulletspawn.rotation); bulletP.velocity = bulletspawn.TransformDirection(Vector3.forward * powerbullet); } } //What is written to spawn if (nextFireTime > Time.time || draw){ if(bulletsLeft <= 0){ OutOfAmmo(); } return; } var direction = gameObject.transform.TransformDirection(Vector3(Random.Range(-0.01, 0.01) * triggerTime, Random.Range(-0.01, 0.01) * triggerTime,1)); var hit : RaycastHit; var position = transform.parent.position; if (Physics.Raycast(position, direction, hit, range, layerMask.value)) { var contact = hit.point; var rotation = Quaternion.FromToRotation(Vector3.up, hit.normal); if (hit.rigidbody){ hit.rigidbody.AddForceAtPosition(force * direction, hit.point); } if (hit.transform.tag == "Water") { var waterHole = Instantiate (Water, contact, rotation) as GameObject; hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); waterHole.transform.parent = hit.transform; waterHole.transform.Rotate(new Vector3(0, Random.Range(-180.0, 180.0), 0));// } if (hit.transform.tag == "Glass") { var glassHole = Instantiate (Glass, contact, rotation) as GameObject; hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); glassHole.transform.parent = hit.transform; } if (hit.transform.tag == "Untagged") { var default1 = Instantiate (untagged, contact, rotation) as GameObject; hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); default1.transform.parent = hit.transform; } if (hit.transform.tag == "Concrete") { var bulletHole = Instantiate (Concrete, contact, rotation) as GameObject; hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); bulletHole.transform.parent = hit.transform; } if (hit.transform.tag == "Wood") { var woodHole = Instantiate (Wood, contact, rotation) as GameObject; hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); woodHole.transform.parent = hit.transform; } if (hit.transform.tag == "Metal") { var metalHole = Instantiate (Metal, contact, rotation) as GameObject; hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); metalHole.transform.parent = hit.transform; } if (hit.transform.tag == "Dirt") { var dirtHole = Instantiate (Dirt, contact, rotation) as GameObject; hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); dirtHole.transform.parent = hit.transform; } if (hit.transform.tag == "canBeUsed") { hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); } if (hit.transform.tag == "Enemy") { hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); yield WaitForSeconds(0.01); var bloodHole = Instantiate (Blood, contact, rotation) as GameObject; if(Physics.Raycast (position, direction, hit, range, layerMask.value)){ if(hit.rigidbody){ hit.rigidbody.AddForceAtPosition(force * direction, hit.point); } } }else if (hit.transform.tag == "EnemyA") { hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); yield WaitForSeconds(0.01); var bloodHole2 = Instantiate (Blood, contact, rotation) as GameObject; if(Physics.Raycast (position, direction, hit, range, layerMask.value)){ if(hit.rigidbody){ hit.rigidbody.AddForceAtPosition(force * direction, hit.point); } } }else if (hit.transform.tag == "EnemyI") { hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); yield WaitForSeconds(0.01); var bloodHole3 = Instantiate (Blood, contact, rotation) as GameObject; if(Physics.Raycast (position, direction, hit, range, layerMask.value)){ if(hit.rigidbody){ hit.rigidbody.AddForceAtPosition(force * direction, hit.point); } } }else if (hit.transform.tag == "EnemyAS") { hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); yield WaitForSeconds(0.01); var bloodHole4 = Instantiate (Blood, contact, rotation) as GameObject; if(Physics.Raycast (position, direction, hit, range, layerMask.value)){ if(hit.rigidbody){ hit.rigidbody.AddForceAtPosition(force * direction, hit.point); } } }else if (hit.transform.tag == "EnemyIS") { hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver); yield WaitForSeconds(0.01); var bloodHole5 = Instantiate (Blood, contact, rotation) as GameObject; if(Physics.Raycast (position, direction, hit, range, layerMask.value)){ if(hit.rigidbody){ hit.rigidbody.AddForceAtPosition(force * direction, hit.point); } } } } PlayAudioClip(soundFire, transform.position, 0.7); if(use_silenced==false){ ShumActive(); } m_LastFrameShot = Time.frameCount; weaponAnim.animation.Rewind("Fire"); weaponAnim.animation.Play("Fire"); KickBack(); bulletsLeft--; } I did.
  9. You might want to Check with raycast, does the AI on we, then perform what you need.
  10. Hi, will try to help you. I wrote a test script. Each line is painted with a comment. Sorry for my English JavaScript #pragma strict var target : Transform; //target AI var moveSpeed = 3; //Speed AI var _agent : NavMeshAgent; // specified variable of agent var chaseRange: float=10.0; //distance visibility AI var UseDumatickAI:boolean=true; //the condition in which AI operates function Start () { } function Update () { if (UseDumatickAI == true){ _agent.SetDestination(target.position); _agent.speed=moveSpeed; _agent.stoppingDistance=chaseRange; } }
  11. At the moment I did it via trigger, as sphereCast does not work for me.
  12. I tried a Spherecast but I didn't work!Maybe I do something wrong? if(UseAgressiveBotALL == true){ //Searching for target if (target == null){ target = GameObject.FindWithTag("Player").transform ; UseAgressiveBotALL = false; } var hit : RaycastHit; var rayOrigin : Vector3 = transform.position; if ( Physics.SphereCast( rayOrigin, chaseRange,transform.forward, hit, chaseRange ) ){ for (var i : int = 0; i < targetTag.length; i++){ if (hit.collider.gameObject.tag == targetTag){ target = hit.collider.transform ; } } } } else if(UseAgressiveBotALL == false){ target = GameObject.FindWithTag("Player").transform ; }
  13. In the documentation the example uses a character controller. I do not understand what it is.(maybe for the center of the SphereCast) In my SphereCast this method need to check squat for the character or am I mistaken? Correct me if I'm wrong. And how can I make it visible in the editor?