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

13 Good

About matheusfig1

  • Rank
  • Birthday 03/13/2000

Profile Information

  • Location:

Contact Methods

  • Skype

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. the weapons are not suposed to work like shooting and all, the attachments on the gun are the focus of this script and example project, so the player can make his own shoot script
  2. I have a unity pro, so can use movie textures in my unity, and for this i need apple quick time, to fix, delete the .mov or .mp4 texture in your project
  3. You can add a trigger to the camera, and create a script that if its hitting on an object, it goes forward, it will stay like an MMORPG
  4. Are you looking at the project window to use it? the name of the guns are there... im not with time to edit the package, try to learn mor and see in the script how to use it
  5. its already done, i will do a download link in the 1º page of this topic
  6. Man, did you are new on unity?(justa a question) If yes, Use the Unity Script reference to learn more and if you have problems post in the help forum, i and others will help you. (im busy i cant do now, im workin on a project)
  7. if you dont put that, see, turn the character camera(looking to the sides) fast. it wont be the same, the lazer will turn to the direction with a delay
  8. matheusfig1

    Laser Cannon

    1 - Create an Empty GO named LazerCannon. 2 - Create an EmptyGO named Lazer(that have to be son of the Lazer Cannon). 3 - Add a LineRenderer to the Lazer, set the end and the start width as 0,01. 4 - Create a cube into the Lazer(as son of the Lazer) remove this Components: - Mesh Filter. - Mesh Renderer 5 - Set the size as | X: 50 | Y: 50 | Z: 0,05 | 6 - Set the collider as trigger. 7 - The Z position of the cube is the range of the laser(lazer script dont have a range). Script that goes in the Lazer : private var Range = Mathf.Infinity; var StartPos : Vector3; private var End : Vector3; var Enabled = true; private var Poss : LineRenderer; function Start () { Poss = this.gameObject.GetComponent(LineRenderer); } function Update () { RayLaser (); //Multple times to "acelerate" the update time StartPos = this.gameObject.transform.position; StartPos = this.gameObject.transform.position; StartPos = this.gameObject.transform.position; StartPos = this.gameObject.transform.position; StartPos = this.gameObject.transform.position; Poss.enabled = false; if(Enabled == true){ Poss.enabled = true; Poss.SetPosition(0, StartPos); Poss.SetPosition(1, End); } if(Enabled == false) { Poss.enabled = false; } } function RayLaser () { var hit : RaycastHit; var Direction = transform.forward; if(Physics.Raycast(transform.position,Direction,hit,Range)){ if(hit.collider.gameObject){ //Multple times to "acelerate" the update time End = hit.point; End = hit.point; End = hit.point; End = hit.point; End = hit.point; } } } Dont forget to assign a material to the lazer. An Image of the ready lazer cannon: https://www.dropbox.com/s/8nwou0as7fp42xv/LazerRenderer.png
  9. down load the package and see how its configured
  10. Create a tag named "Vertice". This package will create a folder into assets with the name "Mesh editor" within it has a scripts named mesh editor. add this to the game object (with a mesh) that you want to edit. when you finish, click in on_off and select finish (the edited mesh wont be saved, it's just in the current scene ) the script will auto-delet and the mesh is ready(you must select finished in on_off before you run the test). The package link : https://www.dropbox.com/s/epvlvs1wm2y7ptq/MeshEditor.unitypackage Renders: https://www.dropbox.com/s/71ouaj0abarqqzs/Render%28Mesh%20editor%29%202.png https://www.dropbox.com/s/euf0mh9xpergf4d/Render%28Mesh%20editor%29%201.png
  11. matheusfig1


    1 - put this script in the obj that "walk"; 2 - create a node id (it cant be the same in two scripts); 3 - put first node as 1 and the last as the last node count; 4 - put the speed of it; 5 - create empty gameobjects and put sphere coliders with size : (0.1; 0.1; 0.1) and trigger seted on (if you put 10 in "last node number" you create 10 gameobject); 6 - ans the name of it is the number of the sequence but with the id (ex: '1("node")' -the "node" is the id-); 7 - and then its ready to use.; var actived = true; var NodeId = "nodeid"; private var NodeCount : String = ""; var FirstNodeNumber = 0; var LastNodeNumber = 0; var CurrentNode = 0; var Speed = 5.0; var CurrentNodeObj : Transform; function Start () { CurrentNode = FirstNodeNumber; } function Update () { NodeCount = CurrentNode + "(" + NodeId + ")"; CurrentNodeObj = GameObject.Find( NodeCount ).transform; RayHit (); if(CurrentNode > LastNodeNumber){ CurrentNode = FirstNodeNumber; } if(active == true){ transform.LookAt(CurrentNodeObj); transform.Translate(0,0,Speed); } } function RayHit () { var hit : RaycastHit; var Direction = transform.forward; if(Physics.Raycast(transform.position,Direction,hit,0.5)) { if(hit.collider.gameObject.tag == "node"){ CurrentNode ++; } } }
  12. ok can be , but in that way works too
  • Create New...