Author Topic: Beta version of 1.13 available!  (Read 12867 times)

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Re: Beta version of 1.13 available!
« Reply #15 on: March 01, 2007, 10:21:46 pm »
It gives you everything in object space.

You would need to convert the vertex vectors into world space, and compare them
against the other model using a ray, or something like that:).
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Beta version of 1.13 available!
« Reply #16 on: March 01, 2007, 11:38:48 pm »
Cyber is right, it's all in object space. If you want it in world space, you've to transform it yourself. But most of the time, it's better to transform the collision source (i.e. what should be checked for collision with this mesh) into object space of the mesh in question by applying the inverse world transformation and transform the result back into world space. That way, you don't have to transform all of the vertices of the mesh.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: Beta version of 1.13 available!
« Reply #17 on: March 02, 2007, 03:43:11 am »
Okay, how do I apply the inverse world transformation? And why would I then transform the result back into world space (presumably after the collision detection)?

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Re: Beta version of 1.13 available!
« Reply #18 on: March 02, 2007, 03:58:26 am »
The invert of a matrix is just matrix.invert(), or matrix.invert3x3() to pretend its only rotational(if i understand right:)).
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Beta version of 1.13 available!
« Reply #19 on: March 02, 2007, 04:01:28 pm »
And why would I then transform the result back into world space (presumably after the collision detection)?
To do something with it. You move into world space and so do your collision partners. But doing the detection in object space leads to a corrected movement vector in object space. You can't apply it into world space directly.