Quantcast
Channel: Answers by "jamesflowerdew"
Browsing index pages (61 articles)

Answer by jamesflowerdew

Above answers both work I agree, but are both kinda wrong in my humble, you CAN swap scripts. but it's quite hard (actually, not that hard come to think of it). You'd GetComponent on one script, and...

View Article


Answer by jamesflowerdew

I don't know a "total answer" (I don't think there is one), but: you can add a test to detect your application/player's location at startup. string vAddress=Application.absoluteURL; string...

View Article


Answer by jamesflowerdew

to lerp from grot to a target angle named vRot:: gRot = new Vector3(Mathf.LerpAngle(gRot.x,vRot.x,pFrame),Mathf.LerpAngle(gRot.y,vRot.y,pFrame),Mathf.LerpAngle(gRot.z,vRot.z,pFrame)); works for me :)

View Article

Answer by jamesflowerdew

errr... how about "public Texture screenImage;"? or "public Texture2D screenImage;" your texture would have to be read write enabled, but that would work.. also you'd have to compare mouseposition xy...

View Article

Answer by jamesflowerdew

There is this, which is, I think, exactly what you were looking for... Shader "gamevial/randomshader" { Properties { _Splat0("Texture1 (R)", 2D) = "white" {} } CGINCLUDE ///reusable stuff here ENDCG...

View Article


Answer by jamesflowerdew

Yes, it's been changed. Cursor.lockState=CursorLockMode.Locked; locks the mouse. Cursor.lockState=CursorLockMode.None; I've forgotten how to hide and show it .

View Article

Answer by jamesflowerdew

foreach(KeyCode vKey in System.Enum.GetValues(typeof(KeyCode))){ if(Input.GetKey(vKey)){ //your code here } } :) this detects what key has been pressed. I use it for my custom input manaer.

View Article

Answer by jamesflowerdew

This might be helpful :) am just writing in the lerp not using mathf, but it works, and as a function . Rect LerpRect(Rect nRect1, Rect nRect2,float nNum){ Rect vRect=nRect1;...

View Article


Answer by jamesflowerdew

shader "gamevial/gasgiant2" { properties{ _MainTex ("Diffuse", 2D) = "white" {} _RippleTex("Ripple (RGB) Trans (A)", 2D) = "black" {} _Shininess ("Shininess",Float)=10 _OffsetX("UV Offset X",Float)=.5...

View Article


Answer by jamesflowerdew

I think you have a wiggly bracket "}" missing on line 14 you actually have loads of wiggly brackets missing in terms of code understandability imho: a pile of if (whatever) dowhatever(); if...

View Article

Answer by jamesflowerdew

It is or at least should be illegal IMHO to clone games. however, they [are there][1] We started something like this, and got quite far before we decided that we wanted to do our own thing, and not...

View Article

Answer by jamesflowerdew

float moo= Input.GetAxis ("Vertical"); float meow= Input.GetAxis ("Horizontal"); if(moo!=0){ meow=0; } transform.position+=new Vector3(meow,moo,0);

View Article

Answer by jamesflowerdew

you need this: renderer.material.SetColor ("_Color", color); dot syntax does not work with materials. also note `"_Color"` is the address of the `_Color` variable in a shader, if your material's shader...

View Article


Answer by jamesflowerdew

you're missing a bracket on your if, and using the wrong symbols to open/close your else... if(Input.GetButtonDown("Sprint")){ } else{ anim.SetBool("Sprint", false); } other errors may disappear when...

View Article

Answer by jamesflowerdew

set newIntensity to a default value at the beginning, before any "if"s or "elses". frustratingly unity/c# treats a variable that's only set when it's nested in an "if" statement as undefined for error...

View Article


Answer by jamesflowerdew

will this do? this.enabled=false; or Destroy(this);

View Article

Answer by jamesflowerdew

Hi All, I figured this out finally. I should mention that I got a clue here, albeit not one that I understood:...

View Article


Answer by jamesflowerdew

input on the x and y will be between 1 and -1 depending on the player's actions (0 if they are not touching anything ;)). mutiplying these by set values will convert these actions into movement at in...

View Article

Answer by jamesflowerdew

public string pLevel; void Update(){ if(Input.GetKey(KeyCode.enter)){ Application.LoadLevel(pLevel); } }

View Article

Answer by jamesflowerdew

I hope this helps. a unity cube is 1m by default. a unity plane is 10m by default. why? I don't know. in 3dsmax, exporting an object that's 1 generic unit long to fbx comes through (set import scale...

View Article
Browsing index pages (61 articles)


Latest Images