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.

Search the Community

Showing results for tags 'raycasting'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
    • Sell
    • Request
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Mars' Modular Multiplayer Photon FPS Kit's Updates
  • Mars' Modular Multiplayer Photon FPS Kit's Tutorials
  • Busy People's Introductions
  • Photon's Tutorials
  • Photon's Photon General
  • Photon's Showcase


  • Free Projects
  • Free Assets
  • Game Demos
  • Photon's Files

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL





YouTube URL

Facebook URL

Twitter URL

IndieGoGo URL

Kickstarter URL


GreenLight URL



Found 4 results

  1. Hello, I`m building my new Multiplayer game using FPSE and Unity`s in-built netoworking . I hope you know that. I have just started to learn it from here. https://unity3d.com/learn/tutorials/s/multiplayer-networking The problem I`m facing is that I wanna give the damage from my Player`s gun to another player(client). I`ve setup the game till this turorial https://unity3d.com/learn/tutorials/temas/multiplayer-networking/shooting-single-player?playlist=29690 As you know that FPSE gun uses Raycasting to give damage to players. So how to give the damage from gun scripts to clients(players). Any idea? As Unity tutorial has used the collision to give damage to clients. I hope you know understand what I mean to say. If I see I`ll upload the weapon Code. Here is ScreenShot of my game. I`ve changed the codes of Player movements. https://unity3d.com/learn/tutorials/topics/multiplayer-networking/testing-multiplayer-movement?playlist=29690
  2. I want to rotate the target from 0 to 180 when it health becomes 0 and after 5 seconds back to 0. I tried taking hints from Armed unity kits but it didn't help me. Below is code. public float CurrentHealth; public float max health = 100; Void Start () { CurrentHealth = maxhealth; } Public void killer (float damage) { CurrentHealth -= damage; If(CurrentHealth == 0) //rotate the target to 0 to 180 } yield return new WaitForSeconds(5f) ; StartCorotouine (down()); IENumerator down () { // back to 0 rotation }
  3. Hi, i am currently making an FPS in one week(Challenge) but i got stuck, the problem is that i made layers that the raycast ignores, and since the skybox is not an object, it ignores it. Help please. Code: void Fire () { if (fireTimer < fireRate || currentBullets == 0) return; RaycastHit hit; if (Physics.Raycast(firePoint.position, transform.forward,out hit, Mathf.Infinity, myLayermask )) { Debug.Log("Hitted: " + hit.transform.name); } anim.CrossFadeInFixedTime("Fire", 0.01f); Rigidbody rb = hit.transform.GetComponent<Rigidbody>(); if(rb != null) { rb.AddForce(transform.forward * 700, ForceMode.Force); } currentBullets--; fireTimer = 0.0f; }
  4. Hello guys! i'm making a very little shotscript for my game, and i'm having some trouble... I don't know if it's a raycast problem or a tag problem. this is my code: using UnityEngine; using System.Collections; public class Shoot : MonoBehaviour { public GunScript gunData; //for later use void Update () { RaycastHit hit; Vector3 fwd = transform.TransformDirection(Vector3.forward); //a little shortcut if(Input.GetButton("Fire1")&& Physics.Raycast(transform.position, fwd, 1000)){ // the distance of the raycast is temporal, suggestions are always welcome! Debug.Log("We have shot" + transform.tag); Debug.DrawRay(transform.position, fwd, Color.red); //IMPORTANT: the ray draws jist a little bit, will add an image below /*if(hit.transform.tag == "Concrete"){ //for later use //disabled by now, will enter something here when the problem is solved } */ } } } As you can see, it doesn't detect the tag, it says "Untagged" :c
  • Create New...