• Create Account

# DT....

Member Since 07 Oct 2012
Offline Last Active Feb 06 2014 03:05 PM

### In Topic: Colliding position

23 January 2014 - 06:00 PM

I don't understand. Why we should take T0 = T1 that is compute it for some T. The two objects will have the same position and it will take different times to get there. That is if first object travels faster or is closer to the collision point than obviously T0 < T1.

http://fivedots.coe.psu.ac.th/Software.coe/241-213/F.Dunn,%20I.Parberry%20-%203D%20Math%20Primer%20for%20Graphics%20and%20Game%20Development.pdf

Page 283

### In Topic: Colliding position

20 January 2014 - 06:30 PM

I think you should be solving:

p0 = p0 + v0 ( T )

p1 = p1 + v1 ( T )

T = Dot ( n, p1 - p0 )  /

Dot ( n, v0 - v1 )

where   n = Normalize( p1 - p0 )

p0 = p0 + v0 ( T0 )

p1 = p1 + v1 ( T1 )

Otherwise, you’re probably looking for a “ray to ray” intersection test.

Also, once you find T, p0 and p1 will be close, but never exact.  32-bits of precision can cause nightmares…

### In Topic: Collision handling- corners & jumping

07 January 2014 - 04:36 PM

i'm wondering if anyone has any suggestions to stop this happening ... or based on the speed of the  object

That sounds right.

You may want to investigate continuous collision detection.  Incorporating speed or velocity should give you a "first time of impact" along the y-axis.

### In Topic: Invert quaternion X,Z rotation

18 December 2013 - 04:00 PM

The problem is that,the rotation around the X and Z axis are inverse (i rotate the device left,i get a right rotation etc)

I think your device is using left-handed coordinates, and your code is using right-handed coordinates (or the other way around.)

Quaternion rotation = new Quaternion(X,Z,Y, -W); //i had to swap Z and Y due to the device axis orientation so i had to negate W

Try:

Quaternion rotation = new Quaternion(X, Y, -Z, W);

### In Topic: Cylinder-Triangle Collision?

09 November 2013 - 11:11 PM

anyone have any good material for doing cylinder-triangle collision?

http://www.geometrictools.com/Documentation/IntersectionTriangleCylinder.pdf

PARTNERS