Jusonex Posted August 18, 2011 Share Posted August 18, 2011 (edited) Hey guys, i want to add new rails to the default GTA map, but for this, i need my own rail system, but I'm not sure how to begin. The calculation of the direction isn't the problem, but how to move the train (realistic) upon the rails. What functions are needed? Has anyone got experiences in this? Edited October 25, 2011 by Guest Link to comment
DiSaMe Posted August 18, 2011 Share Posted August 18, 2011 I had made my own tram system to use both tram lines in SF and move the trams server-side. To keep the tram always on the rail and synced, I used element data to store the position (one number, "progress" of the tram from start to the end). This data (plus the time since the last progress update) was used onClientPreRender to linearly interpolate the position between two nodes and put the tram there, so it was moving at the same speed, no matter what the FPS was. Link to comment
Jusonex Posted August 19, 2011 Author Share Posted August 19, 2011 put the tram there do you mean, setElementPosition before each frame? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now