public override CompoundShape.TransformedShape CreateTransformedShape(JRigidBody body)
    {
        var shape            = new CylinderShape(height, radius);
        var transformedShape = new CompoundShape.TransformedShape(shape, GetOrientation(), offset.ToJVector());

        return(transformedShape);
    }
 public JControllerColliderHit(JRigidBody body, Vector3 point, Vector3 normal, Vector3 moveDirection, float penetration)
 {
     this.body          = body;
     this.point         = point;
     this.normal        = normal;
     this.moveDirection = moveDirection;
     this.penetration   = penetration;
 }
Пример #3
0
    public virtual CompoundShape.TransformedShape CreateTransformedShape(JRigidBody body)
    {
        var position = transform.position - body.transform.position;
        var rotation = Quaternion.RotateTowards(body.transform.rotation, transform.rotation, 360);

        var invRotation = Quaternion.Inverse(body.transform.rotation);

        rotation = invRotation * rotation;
        position = invRotation * position;

        return(new CompoundShape.TransformedShape(Shape, rotation.ToJMatrix(), position.ToJVector()));
    }
Пример #4
0
 public override CompoundShape.TransformedShape CreateTransformedShape(JRigidBody body)
 {
     throw new NotImplementedException();
 }