Quantcast
Channel: Latest Questions by Griffo
Browsing latest articles
Browse All 94 View Live

Anyone brought from TurboSquid?

Hi, Has anyone purchased any models from TurboSquid and used them in Unity? The reason I ask is on their site it states included formats on the right, 3DS, OBJ, Autodesk FBX .. ect but I've noticed the...

View Article



Vector3.Angle()

Hi, I'm trying to get the angle like below. ![alt text][1] But in 3D space not on the same level, I thought this would do it. function angleToPlayer() : float { targetDir = player.position -...

View Article

Get current state of blend tree ?

Hi, Ok I can check to see if a animation is playing in a sub state machine like below. private var idleState = Animator.StringToHash("Locomotion.Idle"); function Start (){ _anim = GetComponent.(); }...

View Article

Set a variable to a collider type.

I'm trying to set a variable to a collider type. When a particle hits an enemy I want it to see what type of collider it has just hit, box, capsule or sphere . I thought something like this would work...

View Article

GUI texture and 2D Texture rotate oposite directions

Hi, I'm trying to make a GUI weapon wheel, but why with my below code does the GUI texture draw from the middle right up and around anticlockwise, and the 2D weapon textures draw from the right middle...

View Article


Change UI GUI Image Sprite at runtime .. Unity 5 .. js

Hi, I'm trying to swap a image sprite of a UI GUI but it's not swapping, what is wrong with my code ? .. I'm getting no errors. Thanks. #pragma strict import UnityEngine.UI; private var GUIweaponSprite...

View Article

UnityEngine.EventSystems.. Trying to figure it out .js

Hi, I'm just starting to use the new UI GUI and are converting my scripts to use the new UI. I've converted a C# script off the internet to .js (form [HERE][1]) but it does not do what I'd expected .....

View Article

CrossPlatformInputManager not inisalizing ..

Hi, I'm trying to use the CrossPlatformInputManager in some javascript, the problem is that when called I'm getting no inputs being registered. The sample code below is what I'm testing with in the...

View Article


The type or namespace name `UnityEditor' could not be found

Hi, I'm using the below CrossPlatformInputInitialize.cs script and when trying to build to iOS I get the following errors, how can I correct these errors? .. Thanks....

View Article


Xcode build error ..

Hi, When trying to build to iOS with Xcode as it builds to the phone then starts to run I get the below error. Does anyone know what this means please? ![alt text][1] [1]:...

View Article

Trying to access SceneManagement

Hi, I'm trying to access SceneManagement in Unity 5.2.3f1 but keep getting the error Assets/Scripts/0-Player/StartMenu.js(4,8): BCE0021: Namespace 'UnityEngine.SceneManagement' not found, maybe you...

View Article

Trying to get the progress of a loading scene in Unity 5.3.1

Hi, I'm trying to get the progress of a loading scene in Unity 5.3.1, below is the snippet of code I'm using but all the progress prints out is in the picture below .. The scene loads and the line...

View Article

The file MemoryStream is corrupted! Remove it and launch unity again

Hi, Ive updated Unity from 5.2 to 5.3.1f1 yesterday and was using it with no problem then saved my scene and project and now have just opened the project again and when I went to play it I got the...

View Article


Clamp UI Image to Canvas

Hi, I'm trying to clamp a UI Image that tracks incoming objects to the canvas but I'm having trouble doing it, I tracks them but then goes out of view with the object, my canvas render mode is Screen...

View Article

Override animation in LateUpdate()

Hi, I want to make a Mech's head look at the player, the Mech is animated so to use .. transform.LookAt (_player.transform.position); in LateUpdate() works fine but I want to slowly rotate it to it's...

View Article


Delete some unused tags and game objects tag changes unity 5

Hi, I've noticed if I delete any unused tags then and game objects in the scene with tags below the deleted ones change to whatever has moved into that position ? Should it do that? I'm sure it didn't...

View Article

Sort list by distance AND by being active

Hi, I have a list of game objects that I sort by distance. _enemyList.Sort(ByDistance); function ByDistance(a: GameObject, b: GameObject) : int { var dstToA =...

View Article


Ambient occlusion not working

Hi, I've setup a mobile project and are baking my textures but I can not get the ambient occlusion to work, it's not showing on the light maps. Here are my settings. ![alt text][1] And here is a shot...

View Article

Why is my list bigger than it should be?

I'm generating 3 random waypoints then saving them to a list but when debugged the list is showing a Count of 5, why? function getWaypionts () { for (var l=0; l

View Article

Is there anyway to avoid a StackOverflow

Hi, I've wrote a script that places 10 spawn points on a NavMesh then checks 1.2mt around it for any obstructions if it find any then it runs again until 10 are placed with nothing around them, them I...

View Article

Quaternion, eulerAngles, localEulerAngles Driving me mad

Hi, I have a reload animation that i want to Slerp slightly, I've tried using Quaternion because I thought it alway taken the shortest route? I have 2 Quaternion, 1 (3,964, -176.115, 0, 0) and...

View Article


-Vector3.right and AddRelativeForce

Hi, can you use -Vector3.right with AddRelativeForce like - prefab.GetComponent.().AddRelativeForce (-Vector3.right * prefabForce); As its acting no different than...

View Article


Root Motion and Mecanim Speed ??

Hi, Can anyone point me in the right direction, videos, threads or code to do with making Mecanim work with Root Motion please. As I've been working with non root motion animations for year's using...

View Article

Raycast exit point of collider

Hi, I'd like to find the exit point of a raycast when hitting a collider, in the picture the raycast (the red line coming from left to right) you can see entering the collider on the top left and...

View Article

Stop a GameObject being affected by fog unity 5

Hi, is it posible? I've tried [This][1] with no luck .. Thanks. I'm using this shader .. ![alt text][2] ![alt text][3] But is there a way to use a layer because I'd also like to use the Unity 5...

View Article


Streaming parts of a level into the scene

Hi, I have Unity 5.4.0b19 and have built a big level, what I'd like to do is split the level into smaller pieces and dream them in when needed. What I've done so far is to do is divide the level into...

View Article

Get points rotations of a Bezier Curve

Hi, I'm trying to get the rotation of the points of a bezier curve and could do with some help please .. The snippets of code below is what I'm using to draw the bezier curves and that fine, I fly my...

View Article

RayCast or LineCast?

Hi, First let me say I've chosen LineCast because I'd read that **Linecast will detect intersection even if both StartPos and EndPos are within the collider** in a old post in this forum. I'm...

View Article

Slow down in the same time over different distances

Hi, I'm trying to slow down a object over different distances in the same time, say 3 seconds. My slow down code is. function lerpSpeed (speed: float, lerpSpeedTime: float) { incomingFlightSpeed =...

View Article



Divide volume depending on chosen amount.

Hi, I'm a bit stuck and could do with some help please, I've put together a script to find the bounds of a prefab that helps me place light probes but what I'd like to do is if I ask for 2, 3 or 4...

View Article
Browsing latest articles
Browse All 94 View Live




Latest Images