Created
July 24, 2012 19:51
-
-
Save markusrt/3172215 to your computer and use it in GitHub Desktop.
Revisions
-
markusrt revised this gist
Jul 24, 2012 . 1 changed file with 11 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,17 @@ if ( Physics.Raycast( new Vector3( thisTransform.position.x-0.3f, thisTransform.position.y, thisTransform.position.z+1f), -Vector3.up, out hit, 0.7f, groundMask) || Physics.Raycast( new Vector3( thisTransform.position.x+0.3f, thisTransform.position.y, thisTransform.position.z+1f), -Vector3.up, out hit, 0.7f, groundMask) ) { falling = false; thisTransform.position = new Vector3( thisTransform.position.x, hit.point.y + xa.playerHitboxY, 0f); } -
markusrt revised this gist
Jul 24, 2012 . 1 changed file with 11 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,17 @@ if ( Physics.Raycast( new Vector3( thisTransform.position.x-0.3f, thisTransform.position.y, thisTransform.position.z+1f), -Vector3.up, out hit, 0.7f, groundMask) || Physics.Raycast( new Vector3( thisTransform.position.x+0.3f, thisTransform.position.y, thisTransform.position.z+1f), -Vector3.up, out hit, 0.7f, groundMask) ) { falling = false; thisTransform.position = new Vector3( thisTransform.position.x, hit.point.y + xa.playerHitboxY, 0f); } -
markusrt revised this gist
Jul 24, 2012 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,9 @@ if ( Physics.Raycast( new Vector3(thisTransform.position.x-0.3f,thisTransform.position.y,thisTransform.position.z+1f), -Vector3.up, out hit, 0.7f, groundMask) || Physics.Raycast( new Vector3(thisTransform.position.x+0.3f,thisTransform.position.y,thisTransform.position.z+1f), -Vector3.up, out hit, 0.7f, groundMask) ) { xa.falling = false; } -
markusrt created this gist
Jul 24, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ if (Physics.Raycast(new Vector3(thisTransform.position.x-0.3f,thisTransform.position.y,thisTransform.position.z+1f), -Vector3.up, out hit, 0.7f, groundMask) || Physics.Raycast(new Vector3(thisTransform.position.x+0.3f,thisTransform.position.y,thisTransform.position.z+1f), -Vector3.up, out hit, 0.7f, groundMask)) { xa.falling = false; }