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 'transform'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • SELL | REQUEST
    • 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

Categories

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

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


YouTube URL


Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 7 results

  1. I have a gun script in which I have declared Now I wanna assign the weaponCamera of gun script from its parent's parent's to its parent(MainCamera). Means like this FPSController>Lean(empty gameobject)>MainCamera(i wanna assign this)>Body_1(gameobject)>Arms(gameobject)>M4A1. FPS controller>Soldier. I dont wanna assign camera manually to inspector because I instantiate clone of m4 gameobejct. Similarly I have declared I wanna assign this gameobject from FPSController's child to GameObject of GunScript.(public GameObject Soldier;) I know the question is pretty hard(or may i dont know how to ask questions like this). I tried various codes like : But it didnt work! Im stuck w/ it since Monday. Don't make comments on my english. NVM!
  2. I made a script (C#) and want that my gameobject spawns at a random position near the object (tree)(radius of maximal 3) that gets destroyed how can i doo this ? HERE is the Scipt: using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class Treehealth : MonoBehaviour { public int health = 100; public GameObject logs; public GameObject conifer_tree; private void Update() { if (health <= 0) { Destroy(gameObject); Instantiate(logs, conifer_tree.transform.position, Quaternion.identity); Instantiate(logs, conifer_tree.transform.position, Quaternion.identity); Instantiate(logs, conifer_tree.transform.position, Quaternion.identity); Instantiate(logs, conifer_tree.transform.position, Quaternion.identity); Instantiate(logs, conifer_tree.transform.position, Quaternion.identity); } } } i saw a video but this was in javascript i hope anyone can help me
  3. Hi I working on collision system for my game i have custom colliders. I used "http://answers.unity3d.com/questions/777855/bounds-finding-box.html" to create bounding box for collisions. I am getting problem for the boxes where right and forward values have been used to create box. Otherwise its working fine. Anybody has any idea how to include right and forward vectors in calculating 8 points for the cube. Below is my code for calculating points. public static void GetBoundsPointsNoAlloc(BoxRegion bx, Matrix4x4 colliderBox4x4,Vector3[] points, Matrix4x4 mx) { Transform tr = Utils.FromMatrix4x4(ref DebugCollisionTestSphere.trans,mx); Vector3 v3Center = bx.center; Vector3 v3ext = bx.GetExtents(); Vector3 right = bx.right; Vector3 forw = bx.forward; //Quaternion qua = Quaternion.LookRotation (bx.forward,Vector3.Cross (bx.forward, bx.right)); // tr.TransformDirection (bx.forward); //tr.localRotation = qua; tr.forward = bx.forward; tr.right = bx.right; //tr.rotation = qua; points [0] = tr.TransformPoint (new Vector3 (v3Center.x - v3ext.x, v3Center.y + v3ext.y, v3Center.z - v3ext.z)); // Front top left corner points [1] = tr.TransformPoint (new Vector3 (v3Center.x + v3ext.x, v3Center.y + v3ext.y, v3Center.z - v3ext.z)); // Front top right corner points [2] = tr.TransformPoint (new Vector3 (v3Center.x - v3ext.x, v3Center.y - v3ext.y, v3Center.z - v3ext.z)); // Front bottom left corner points [3] = tr.TransformPoint (new Vector3 (v3Center.x + v3ext.x, v3Center.y - v3ext.y, v3Center.z - v3ext.z)); // Front bottom right corner points [4] = tr.TransformPoint (new Vector3 (v3Center.x - v3ext.x, v3Center.y + v3ext.y, v3Center.z + v3ext.z)); // Back top left corner points [5] = tr.TransformPoint (new Vector3 (v3Center.x + v3ext.x, v3Center.y + v3ext.y, v3Center.z + v3ext.z)); // Back top right corner points [6] = tr.TransformPoint (new Vector3 (v3Center.x - v3ext.x, v3Center.y - v3ext.y, v3Center.z + v3ext.z)); // Back bottom left corner points [7] = tr.TransformPoint (new Vector3 (v3Center.x + v3ext.x, v3Center.y - v3ext.y, v3Center.z + v3ext.z)); // Back bottom right corner }
  4. I'm trying to make it so that a Photon Instantiated object becomes a child of a transform. I know how to set the parent locally, but over the network the object just stays in place. Here's what I have so far- GameObject hat = (GameObject)PhotonNetwork.Instantiate (hatName, head.position, head.rotation, 0); hat.transform.parent = head; Sorry if this is way out of the ball park of what I need to do. I didn't think I'd need any remote calls or anything too fancy
  5. ok, I have got up to this far with the script. it will move the object its attached to if i continuosly keep pressing the key. but what I want to do is activate an action where when i press the key once, will move the object from it's current position to a nother and stop. var speed = 5.0; function Update () { if (Input.GetKey("l")) { transform.Translate(Vector3.right * Time.deltaTime); } What I want is, I press the "l" key once and the object should move from the current ostion to some uints and stop. (trigering a sliding door panel to slide a side with a keystroke
  6. Hi everyone, I need a little help by something that i cant get work. Im totally a beginner in scripting and unity and want to do a small android game. So i have a cube in a scene that can be moved and rotated by the touchscreen, now in a other scene I have the same cube and I want that if the cube in the first scene gets moved the other cube goes to the exact same lovation. I hope anyone can help me. thanks
  7. Hi All... A while back aldonetto from answers.unity3d helped me get a teleport script working. I have modified to have Audio - Particle FX (Though particle FX Wont Disable) Here is the script, Below it i will post info on the actual issue So.. When the raycast hits and teleports me there... I don't want it to be instant.. I want it to take a little time.. like.. 1.5 So my particle FX can have enough time to play and still look - function beautifully. I'm not sure how to use timers or pretty much anything to do with vectors - transform.. So this has been pretty much impossible for me to do myself. So I'm here "Best Unity Community" Asking For Your Help! Information is greatly appreciated, Thank you for the time you took to read this post .
×
×
  • Create New...