- Home /
how to do user position validation on server without using UnityEngine.*
In the game client part, i use "Character Controller" and "Terrain Collider" to make sure the user stay on the ground and moving in a correct speed. In the game server part, i need to validate the position and speed sent from the client to make sure the user didn't use cheating tool.
The question is, how do i do the server part without using the Unity API? the server may be a c++ server or a java server, accessing unity's api like TerrainData.GetHeight and GetInterpolatedHeight is impossible.I imported the same terrain height data into the server, but i can't find any info about Unity terrain's interpolation algorithm, so i can't get arbitery coordinate's height.
i also notice that unity's use PhysX's api to do physic calculation, should i use PhysX's api to do this job?
i don't want to do too much effort to guess which way is correct, this situation should be quite common and many game will need to do the same thing. any one can help?
thanks..
"i don't want to do too much effort to guess which way is correct"
$$anonymous$$y guess is that you're going to be out of luck. It sounds like what you want to do is recreate the Unity engine outside of Unity. That (to me) sounds like a massive undertaking. You could potentially run PhysX on your own and try to duplicate Unity's implementation, and you could potentially figure out the interpolation algorithm for terrains from heightmaps in Unity, but these aren't easy things.
One thing you can do is run Unity in headless mode on a server, and use it to do calculations for you.
$$anonymous$$aybe I'm missing some easy way of doing this - perhaps someone else will be able to elucidate you.
Answer by Steve Goodman · Jan 21, 2013 at 04:40 AM
Just answer to finish the question, i think Julien is right, i will make unity run in headless mode as a server instance, it's the only way i found so far.
Your answer
Follow this Question
Related Questions
Make a simple tree 1 Answer
Objects keep falling through terrain 1 Answer
How can a look up of grass height at a position on terrain be done? 0 Answers
Unity terrain very low FPS on mobile 0 Answers
Create Terrain withTerrainData 0 Answers