- Home /
Using transform in kinematics rigid body
I have a confusion about Kinematics Rigid Bodies
I'm making a game in which a bat hits the ball I've attached a Rigid Body on bat with collider but when try to hit the ball with a little speed its straight passes through it, i have tried also CollisonDetection = ContinousDyanmic but it didn't worked Can anyone suggest me a solution
Also i want to ask that i'm using transform.translate to move the bat with respect to mouse axis and enabled the rigid body as Kinematics. Does that effect any sort of collison ? i mean do i have to use rigidbody.moveposition for kinematics rigid body movement or transform.translate
Answer by Julien-Lynge · Aug 13, 2011 at 08:16 PM
Trying to directly adjust the transform of a kinematic rigidbody is a bad idea. When you transform the position my guess is that it changes instantly - you should try moving the bat with one of the rigidbody methods for movement and see what happens. Also, you do have a collider and rigidbody on both the bat and the ball, correct? If you're using a mesh collider, have you made sure that the mesh normals are pointing the correct direction?
rigidbody methods for movement adds friction, i don't want friction on my bat. How i can avoid it
Actually, there won't be any friction unless you add a force for it, unless you have the bat scraping along another surface with a defined Physic material, in which can you can adjust the friction of that material.
If you want a constant velocity rather than an applied force, you can set velocity directly with rigidbody.velocity.
Your answer
Follow this Question
Related Questions
Multiple Colliders With Mechanim 1 Answer
How to create and move primitives without the static collider penalty? 2 Answers
Controll squeeze of rigidbody between static collider and kinematic rigidbody. 1 Answer
Mesh renderer does not move with parent rigid body 5 Answers
Why attach a kinematic rigidbody to a collider that moves a lot? 1 Answer