- Home /
How can I use Vector3, Quaternion Classes in my server?
There are many useful methods in unity's Vector3 and Quaternion classes.
For example, RotateAroundPoint or Slerp for EulerRatation(Vector3).
In my game, entire AI movement depends on the server logics.
Following my working process, I made my AI works in unity, and was about to move that logic into my photon server.
So I added UnityEngine.dll to my server(So far I didnt know that it wont work).
And there I found some security exception about Ecall method.
Finally I noticed that I should have made my own classes or used the other library for 3d-math.
Can you help me to find some open library for 3d-math(which has similar functions to unity)?
Or to find the place where I can study about 3d-math to make my own.
Things i need to learn are...
Quaternion to Euler(Vector3), and reverse.
Quaternion operator * with Vector3 (rotate a point with the quaternion)
Quaternion.Angle(Quaternion A, Quaternion B)
Quaternion.Slerp
Quaternion.LookRotation
Those are things I'm using in my code in server.
Plz help me!
Self-update : found a good library called Slimmath. But still There is no Translations between quaternion to eulor, Need to get into it more..
If you want to learn 3d program$$anonymous$$g, I suggest checking out these links:
http://en.wikipedia.org/wiki/Euclidean_vector
http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
Yes I know they are all Wiki articles, but they can really help :)
If you have any questions about wording etc, Google is always available XD
Oh and also, this is not a Unity related question. You should not ask this here :)
Thank you for useful links Benprojections! Those really helps!! It's not directly related with unity, but ppl who like me may stuck same problem.(Specially some1 who dosent have basic knowledge about 3d progam$$anonymous$$g - could be possible bcuz unity is easy to use and there would be many ppl who doesnt start from a programmer like me) If there is... :(.
Your answer
Follow this Question
Related Questions
How is the rotation of a Transform converted into a Vector3 in the inspector ? 2 Answers
Can someone explain this part of the PlayerMoveController.js script in the AngryBots demo? 3 Answers
Slerp look at direction not working... 3 Answers
How can I convert a Quaternion to a direction vector? 3 Answers
How can I quickly calculate Land Speed from a Vector3? 1 Answer