Tag Info

New answers tagged

0

Expanding upon Anthony Ngo's answer As of Unity 5.1 you can simply do it in the editor: Source: http://unity3d.com/unity/whats-new/unity-5.1 To get to that part you can probably do Ctrl + F then type rigidbody. Your browser should then highlight that part.


4

First of all, since you're working in 2D, you'll want to use the type RigidbodyConstraints2D as opposed to just RigidbodyConstraints. Secondly, you can't freeze the y rotation on 2D rigidbodies, only in the z axis, which you can do by saying: pos = RigidbodyConstraints2D.FreezeRotation; Equally, you could just set it in the inspector with the gameobject ...


2

It looks like these two lines are overriding the velocity-based movement from the RigidBody: LillyRB.MovePosition (LillyRB.position + (transform.forward * movever)); LillyRB.MovePosition (LillyRB.position + (transform.right * movehor)); Generally when combining player/AI control with Rigidbody physics, you'll want to use forces & accelerations to move ...


0

As stated in the comment to your question, btTransform is a matrix. You can do the matrix operations as you see fit, without using the set* methods. Once you're satisfied, just use the matrix as you're doing now.



Top 50 recent answers are included