Obtener velocidad angular de un vehнculo
#1

Hola a todos, desde que saliу la versiуn 0.3a de SA-MP hay funciones para obtener la velocidad de los vehнculos pero no habнa hasta la versiуn 0.3b una para darle velocidad angular al mismo (lo cual es muy ъtil). Siempre quise saber como obtener la velocidad angular del vehнculo, es decir, tres vectores: X, Y, Z. Funciona asн:

Si el vehнculo va hacia adelante, la Y serб positiva.
Si el vehнculo va hacia atrбs, la Y serб negativa.

Si el vehнculo va hacia la derecha, la X serб postiva.
Si el vehнculo va hacia la izquierda, la X serб negativa.

Si el vehнculo va hacia arriba (hacia su mismo techo), la Y serб positiva.
Si el vehнculo va hacia abajo (hacia su suelo o sus neumбticos), la Y serб negativa.

Igualmente si el vehнculo va hacia adelante y a la misma vez hacia la izquierda, la Y darб un valor positivo, la X uno negativo y la Z cero.

Le pedн ayuda a un miembro del staff de SA-MP y su respuesta fuй esta:

Quote:
Originally Posted by JernejL
You need to take velocity and unrotate it with the quternion's matrix that my code creates, this can get you started on what you need:

http://www.gamedev.net/community/for...94&whichpage=1

"By "unrotating" you're basically multiplying the vector by the inverse of the matrix."

http://mathworld.wolfram.com/MatrixInverse.html

This is helpful too:

http://www.******.com/codesearch/p?h...a=N&cd=1&ct=rc
Sin embargo, mis conocimientos en matemбticas no son buenos y no tengo idea de que hacer con su cуdigo (que de por sн es muy complicado e inentendible para mi)...

їAlguien tiene alguna idea de como obtenerla?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)