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.

EchtPeter

Member
  • Content Count

    42
  • Joined

  • Last visited

Community Reputation

0 Neutral

About EchtPeter

  • Rank
    Member
  1. EchtPeter

    Advantage Run

    advantage == erweitert
  2. EchtPeter

    Advantage Run

    so that is a new Script. It is a lot of easier to understand . #pragma strict //**********************************************************************************// //******Made by EchtPeter, Special Thanks to OcularCash*****************************// //**********************************************************************************// var NewPos : Vector3; // that the NewPosition var NewRot : Quaternion; // that the NewRotation var DefPosition : Vector3; // that the DefPosition var DefRotation : Quaternion; // that the DefRotation var dampVelocity = 0.4; // How fast should it go var Run : Transform; // that the RunGO function Start() { DefRotation.w = 1; NewRot.w = 1; } function Update () { AdvantageRunning(); } function AdvantageRunning() { if(Input.GetKey(KeyCode.LeftShift) && (Input.GetAxis("Horizontal") || Input.GetAxis("Vertical"))) { Run.transform.localPosition = Vector3.Lerp(Run.transform.localPosition, NewPos, Time.deltaTime * dampVelocity); Run.transform.localRotation = Quaternion.Slerp(Run.transform.localRotation, NewRot , Time.deltaTime * dampVelocity); }else { Run.transform.localPosition = Vector3.Lerp(Run.transform.localPosition, DefPosition , Time.deltaTime * dampVelocity); Run.transform.localRotation = Quaternion.Slerp(Run.transform.localRotation, DefRotation , Time.deltaTime * dampVelocity); } } if anyone wants that I upload the Script of the "Drawing Backwards" Script (also my "Drawing Backwards" Script not from Armedunity) please tell me. But I think a lot of people in this forum can easily write the Script.
  3. EchtPeter

    Advantage Run

    #pragma strict var newPos5 : float = 0.8; //New Pos on X var newPos6 : float=-0.6; // New Pos on Y var newrot7 : float=342.7; // New Rot on X var newrot8 : float=297.51; // New Rot on Y private var defPos : float = 0; //def Pos on X private var defPos1 : float= 0; // Def Pos on Y private var defrot2 : float= 0; // Def Rot on X private var defrot3 : float= 0; // Def Rot on Y private var NewPos1 : float; private var NewPos2 : float; private var NewPos5 : float; private var NewRot3 : float; private var NewRot4 : float; private var dampVelocity = 0.4; private var dampVelocity2 = 0.4; private var dampVelocity3 = 0.4; private var dampVelocity4 = 0.4; var Run : Transform; // that the animationGO function Update () { AdvantageRunning(); } function AdvantageRunning() { if(Input.GetKey(KeyCode.LeftShift)) { NewPos1 = newPos5; NewPos2 = newPos6; NewRot3 = newrot7; NewRot4 = newrot8; var newPos = Mathf.SmoothDamp (Run.transform.localPosition.x, NewPos1, dampVelocity, .3); var newPos2 = Mathf.SmoothDamp(Run.transform.localPosition.y, NewPos2, dampVelocity2, .3); var newPos3 = Mathf.SmoothDamp(Run.transform.localRotation.x, NewRot3, dampVelocity3, .3); var newPos4 = Mathf.SmoothDamp(Run.transform.localRotation.y, NewRot4, dampVelocity4, .3); Run.transform.localPosition.x = newPos; Run.transform.localPosition.y = newPos2; Run.transform.localRotation.x = newPos3; Run.transform.localRotation.y = newPos4; }else{ var newPos9 = Mathf.SmoothDamp (Run.transform.localPosition.x, defPos, dampVelocity, .3); var newPos10 = Mathf.SmoothDamp(Run.transform.localPosition.y, defPos1, dampVelocity2, .3); var newPos11 = Mathf.SmoothDamp(Run.transform.localRotation.x, defrot2, dampVelocity3, .3); var newPos12 = Mathf.SmoothDamp(Run.transform.localRotation.y, defrot3, dampVelocity4, .3); Run.transform.localPosition.x = newPos9; Run.transform.localPosition.y = newPos10; Run.transform.localRotation.x = newPos11; Run.transform.localRotation.y = newPos12; } } If somebody find a bug or an error please tell me . Sorry for my bad English ,I am German.
  4. EchtPeter

    Aim Down Sight

    Hi! Has anyone an idea to modify this script that the gun is aiming in the middle of the screen ? var gun : Transform; var nextPos = 0.3034148; var nextField = 40.0; var nextPos2 = 0.9824438; var dampVelocity = 0.4; var dampVelocity2 = 0.4; var dampVelocity3 = 0.4; var newPosX : double=-1.545; var newPosY : double = 0.50; var defPosX:float; var defPosY:float; function Update () { var newPos = Mathf.SmoothDamp(gun.transform.localPosition.x, nextPos, dampVelocity, .3); var newPos2 = Mathf.SmoothDamp(gun.transform.localPosition.y, nextPos2, dampVelocity3, .3); gun.transform.localPosition.x = newPos; gun.transform.localPosition.y = newPos2; if (Input.GetButton("Fire2")&& Moving.run == false ) { //adjust viewpoint and gun position nextField = 40.0; nextPos = newPosX; nextPos2 = newPosY; //slow down turning and movement speed } else { //adjust viewpoint and gun position nextField = 60.0; nextPos = defPosX; nextPos2 = defPosY; //speed up turning and movement speed } } Thanks in advance!
  5. Could you send me the download link to me please
  6. EchtPeter

    Prefab error

    Hi Oma I want to make a Desert Eagle like Yours but the animations. I want to make that the Gun should Play the shoot Animation but i say Input.GetButton("Fire1") so the animation Play but if i Press the old Animation should stop and the New should Start how can i do?
  7. EchtPeter

    Prefab error

    yes i know but could you make this script smoother please because i make my own fps so i will now all at my own (by the scripts)
  8. EchtPeter

    Prefab error

    hi do you now a way to make that script more smoother like in your fpsc package like in real life so not in an instant like this script. var ZahlX : float; var ZahlY : float; var ZahlZ : float; var isFire2 : boolean = true; function Update () { if(Input.GetButtonDown("Fire2")){ isFire2 = true; } if(isFire2 == true){ //mainCamera.camera.fieldOfView = 30; transform.localPosition.y =ZahlY; transform.localPosition.x = ZahlX; transform.localPosition.z = ZahlZ; } if(isFire2 == false){ //mainCamera.camera.fieldOfView = 60; transform.localPosition.y = 0.9824438; transform.localPosition.x =0.3034148; transform.localPosition.z = 1.112915; } if(Input.GetButtonUp("Fire2")){ isFire2 = false; } }
  9. EchtPeter

    Prefab error

    I'm not Lazy but i have 3D max and my MdL to 3D max doesn't work. I have Look about 2hours of videos and None Works by my pc. So i ask you about some Models but if you don't want to give me thats okay
  10. EchtPeter

    Prefab error

    I know it but you have it in 3d max format or another format or fbx format ???
  11. EchtPeter

    Prefab error

    do you send it already ??? Please write back
  12. EchtPeter

    Prefab error

    hi OMA Could you send it on this email peter.huber30@yahoo.de please
  13. EchtPeter

    Prefab error

    but you can give it to me per email and i use it for demonstrations too !! by the way you are speaking german right?
  14. EchtPeter

    Prefab error

    OMA if you didnt want to sell it could you please share your pistl and two of your machine guns because i have test out many weapons of the "animated weapons "But none of these weapons work in unity but in 3d max works this animation very well And by the way are you from Germany or Austria
×
×
  • Create New...