New way of constructing Capsule
Posted: Wed Oct 27, 2010 3:36 pm
Hi,
I want to suggest an alternate way of constructing a Capsule. For constructing a Capsule using an existing constructor we'll need a position (Vector3), a length (float and a radius (float) as below.
May I suggest constructing a Capsule by specifying a beginning position (Vector3), an ending position (Vector3) and a radius (float), as below.
In this way the code also is able to provide the position and orientation of the Capsule for us. One hassle I've been with using other physics engine was I often need to ensure the orientation of a capsule is right in different coordinate system. In specifying just begin and end position with the radius, it sounds (to me) more intuitive and axis neutral.
Thanks
flyingbag
I want to suggest an alternate way of constructing a Capsule. For constructing a Capsule using an existing constructor we'll need a position (Vector3), a length (float and a radius (float) as below.
Code: Select all
public Capsule(Vector3 pos, float len, float rad);
Code: Select all
public Capsule(Vector3 beg, Vector3 end, float rad);
Thanks
flyingbag