Posted: Sat Nov 07, 2009 12:11 pm Post subject: Rigidbody
Hi,
I am new to 3d Gaming and need to know a basic thing.
I want to rotate an object (say a pedal ) about a fixed point and make it hit a ball which should then fly off in a direction and with a speed which is in accordance with laws of physics.
In Unity3d what I have done is attached a sphere collider and a rigidbody to the ball and a mesh collider and a rigidbody to the object (the pedal) with gravity turned off on it.
I call a transform.rotate() on the object whenever I want to hit the ball (and then bring it back to the original position in the next frame), but this only makes the object treat the paddle as a static collider in the new rotated position and disregards all interactions vis-a-vis the physics.
For the expected behviour do I have to apply a torque to the paddle to make it rotate ?
Joined: 19 Jul 2005 Posts: 1603 Location: Blackpool, United Kingdom
Posted: Mon Nov 09, 2009 5:47 pm Post subject: Re: Rigidbody
anur_p wrote:
For the expected behviour do I have to apply a torque to the paddle to make it rotate ?
Yes. Generally, you don't get the expected physical behaviour when you move rigidbody objects by setting their position rather than moving them with forces and torques. _________________ None of you understand... I'm not logged-in here with you - YOU'RE LOGGED-IN HERE WITH ME!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum