Quantcast
Channel: Answers by "jamesflowerdew"
Browsing all 61 articles
Browse latest View live

Answer by jamesflowerdew

Selection.activeGameObject=vWay.gameObject; :)

View Article



Answer by jamesflowerdew

The following may not be the best answer, but it is one answer. This kind of stuff can usually done by sending raw data (although it is more work). You'd save out the data then use this to rebuild the...

View Article

Answer by jamesflowerdew

I've been here I think. at a guess your collider needs to be set to "is trigger" (a checkbox on your collider). at a guess this will negate it's use as a platform which means you'll need another...

View Article

Answer by jamesflowerdew

As above I'd be tempted to apply gravity without the physics pseudocode below: pArrowMomentum+=new Vector(0,MyGravity*Time.deltaTime,0); transform.LookAt(transform.position+pArrowMomentum);...

View Article

Answer by jamesflowerdew

I don't do JavaScript so my grammar may be dodgy, but does this help? function OnCollisionEnter(col:Collision) { print(col.gameObject.name); var vScript: EnemyAI=col.gameObject.GetComponent(EnemyAI);...

View Article


Answer by jamesflowerdew

This uses mouse or finger to generate an force called pPush, which is then applied to a ball. nFrame is Time.deltaTime all other vars with a "p" in front need declared at the top of your script. void...

View Article

Answer by jamesflowerdew

does this help? you can split a string with string slpit so you can just use whatever you like to delimit the item like below, (to and from string). string timertext = ""+...

View Article

Answer by jamesflowerdew

A "splat" mixes two or more textures using data from a third one (or elsewhere). In this case, Splats 1-4 are the textures to be displayed/mixed, and the splatmap has the colours that determine which...

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


Answer by jamesflowerdew

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

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

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

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

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

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

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

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

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

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

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
Browsing all 61 articles
Browse latest View live




Latest Images