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 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

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

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

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

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

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

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

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

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


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>