- Home /
Is there a mirror for Unify Community resources?
As many of you might of noticed the Unify Community wiki has gone offline because of a hacker problem. I've been trying to get to some of the resources hosted there... specifically the DontGoThroughThings.js . Does anyone know, or can provide a mirror to such resources so that we can all benefit from the brilliant resources and not all be effected by the hackers.
Cheers - C
Answer by dannyskim · Jan 13, 2012 at 10:30 PM
Seeing as how this script is publicly available, I will just post it on this thread for you. Of course, no credit for the authoring of this script goes to me, and I can't remember if that information was commented in, I may have removed it.
I'd rather post it here and not put it up for file sharing because of the fact that free file sharing websites typically will take down the link if it doesn't receive enough traffic.
using UnityEngine; using System.Collections;
public class DontGoThroughThings : MonoBehaviour
{
public LayerMask layerMask; //make sure we aren't in this layer
public float skinWidth = 0.1f; //probably doesn't need to be changed
private float minimumExtent;
private float partialExtent;
private float sqrMinimumExtent;
private Vector3 previousPosition;
private Rigidbody myRigidbody;
//initialize values
void Awake()
{
myRigidbody = rigidbody;
previousPosition = myRigidbody.position;
minimumExtent = Mathf.Min(Mathf.Min(collider.bounds.extents.x, collider.bounds.extents.y), collider.bounds.extents.z);
partialExtent = minimumExtent * (1.0f - skinWidth);
sqrMinimumExtent = minimumExtent * minimumExtent;
}
void FixedUpdate()
{
//have we moved more than our minimum extent?
Vector3 movementThisStep = myRigidbody.position - previousPosition;
float movementSqrMagnitude = movementThisStep.sqrMagnitude;
if (movementSqrMagnitude > sqrMinimumExtent)
{
float movementMagnitude = Mathf.Sqrt(movementSqrMagnitude);
RaycastHit hitInfo;
//check for obstructions we might have missed
if (Physics.Raycast(previousPosition, movementThisStep, out hitInfo, movementMagnitude, layerMask.value))
myRigidbody.position = hitInfo.point - (movementThisStep/movementMagnitude)*partialExtent;
}
previousPosition = myRigidbody.position;
}
}
Answer by dannyskim · Jan 13, 2012 at 10:20 PM
As far as I'm aware, they don't have a separate mirror for the file downloads, it's probably all hosted in a consolidated rack location. That said, they probably turned off all access to their http servers along with access to files. Mirrors are usually only used on websites that are sharing large files, wherein this case, it's just script files that are typically all less than 50kb.
So in short, no, you're out of luck. I have the c# version I think in some folder on my Mac if you want that.
Cheers for the information and that would be absolutely brilliant, for the benefit of anyone else after that script any chance you could use a file upload website to share it? Thanks for the reply!
Your answer
Follow this Question
Related Questions
help fix expando object .js file error. 0 Answers
I can't go to unify wiki 2 Answers
Can't get Object2Terrain to work 2 Answers