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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer by jamesflowerdew
public string pLevel; void Update(){ if(Input.GetKey(KeyCode.enter)){ Application.LoadLevel(pLevel); } }
View ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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