When i detect contact with box and cone,i don't know why it doesn't work
ConeShape's center is at half of its height and direction is +y, around Y
i rotate ConeShape with Quaternion(new Vector3D(1,0,0), countAngle), new Point3D(0, 0, 0)
or Quaternion(new Vector3D(0, 0, 1), countAngle), new Point3D(0, 0, 0))
it work fine.
However,when i rotate the shape in both direction or set translation before rotation,it doesn't work
And there is another question:In WPF, when i rotate the object at Quaternion(new Vector3D(0, 0, 1), countAngle), new Point3D(0, 0, 0)),i must set the worldMatrix to rotate at Quaternion(new Vector3D(0, 0, 1), -countAngle), new Point3D(0, 0, 0)),why?
i wonder,is there anything wrong?what is limitation about rotation when detecting contacts?
Thx in advance!!
Contacts detect question...
-
- Posts: 18
- Joined: Thu Nov 15, 2007 2:01 pm
- Location: Sichuan province, China
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Contacts detect question...
The world matrix needs to be concatenated in the right order, first apply the rotation and then the translation.
Have you compared your setup with a WPF demo?
http://chriscavanagh.wordpress.com/2007 ... ap-update/
http://chriscavanagh.wordpress.com/2007 ... cs-source/
Hope this helps,
Erwin
Have you compared your setup with a WPF demo?
http://chriscavanagh.wordpress.com/2007 ... ap-update/
http://chriscavanagh.wordpress.com/2007 ... cs-source/
Hope this helps,
Erwin
-
- Posts: 18
- Joined: Thu Nov 15, 2007 2:01 pm
- Location: Sichuan province, China
Re: Contacts detect question...
thank u for your quick answer~
then how can i construct BulletX WorldMatrix in WPF?
can i set more then one rotation to a collisionobject ?
I cannot open the links you supply. thank u again~
then how can i construct BulletX WorldMatrix in WPF?
can i set more then one rotation to a collisionobject ?
I cannot open the links you supply. thank u again~
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Contacts detect question...
Can you try those links instead?
- 3D physics demonstration running as an XBAP (you'll need .NET Framework 3 or Vista to run this).
http://www.codeplex.com/XBAP3DPhysics
- A managed version of the Bullet Physics Library (based on XnaDevRu's library) for Silverlight 1.1. Includes demo project.
http://www.codeplex.com/SilverlightPhysics
The Bullet rigid body/collision object has just one world transform, it is up to you how to construct this. Each rigidbody/collision shape can have one or a compound of collision shape. Each collision shape is local to the rigidbody, and can have a local offset transform (in the case of a compoundShape).
It might be better to check the WPF documentation/forums on matrices.
Hope this helps,
Erwin
- 3D physics demonstration running as an XBAP (you'll need .NET Framework 3 or Vista to run this).
http://www.codeplex.com/XBAP3DPhysics
- A managed version of the Bullet Physics Library (based on XnaDevRu's library) for Silverlight 1.1. Includes demo project.
http://www.codeplex.com/SilverlightPhysics
The Bullet rigid body/collision object has just one world transform, it is up to you how to construct this. Each rigidbody/collision shape can have one or a compound of collision shape. Each collision shape is local to the rigidbody, and can have a local offset transform (in the case of a compoundShape).
It might be better to check the WPF documentation/forums on matrices.
Hope this helps,
Erwin