OnTriggerEnter detecting Collision but collision not happening (533402)

I am creating a cube on mouseDrag.

Starting point of Cube = First MouseDown say POINT1.

End Point or Length of the Cube is decided on MouseDrag say POINT2.

I have attached rigidbody and box collider to the cube. I want to use this cube as a bat. The first POINT1 is fixed and POINT2 is moving.

Ball is moving in the screen. I want to hit the ball with this bat.

If I move the bat POINT2 slow and hit the ball then ball is deflected as per physics rules. But If I move the bat POINT2 fast, ball is not getting deflected.

In OnCollisionEnter Method I am able to see collision of BAT and ball but ball is not getting deflected

The Screen shot of what I am trying to do is in below youtube link https://www.youtube.com/watch?v=-2Azwggwa_E

Any help is appreciated.

Bopa

Can anyone help me out please?

Looks like its moving so fast that the ball goes through…
You’ll need to add some other checking method there, with raycast or just detecting which side the ball is (and how far from line), then keep ball on that side always by code…

Or adjusting physics settings might help little bit (but not always),

Some ideas too,
http://wiki.unity3d.com/index.php?title=DontGoThroughThings

I tried setting physics manager and donotgothroughthings but no success.

OnCollisionEnter function of ball I am able to see the message that Ball has collided with bat.

I tried putting the below script in onCollsionEnter of ball but no success

var cp:ContactPoint = collision.contacts[0];

  • var move:Vector3 = Vector3.Reflect(oldVel,cp.normal);*
  • rigidbody.velocity = move;*

// bumper effect to speed up ball
_ rigidbody.velocity += cp.normal.x*2.0f;_
function FixedUpdate()
{

  • oldVel = rigidbody.velocity;*
    }

Any other idea please.
Bopa