Client Side Only Shape Movement
by Devin Passage · in Torque 3D Professional · 08/19/2010 (7:36 am) · 1 replies
Hello!
I've got a huge number of shapes that id like to move just client side, and not have them be ghosted over the net. However, when i try to move them in a function such as processTick or advanceTime, they do not move. If i turn on the editor, i can see invisible client-side shapes moving, but the actually rendered shapes just sit there, when the expected result is the opposite (the server shapes should stay there, and the client shapes should move). I'd prefer to not create server side objects at all, since it is a waste, but TSShape must create server objects. TSShapeInstance might work, but i do not understand how you set its transform.
The basic question here is how do you load and move shapes just on the client and not transmit that movement info over the net and not have it even exist at all on server.
Thank you!
I've got a huge number of shapes that id like to move just client side, and not have them be ghosted over the net. However, when i try to move them in a function such as processTick or advanceTime, they do not move. If i turn on the editor, i can see invisible client-side shapes moving, but the actually rendered shapes just sit there, when the expected result is the opposite (the server shapes should stay there, and the client shapes should move). I'd prefer to not create server side objects at all, since it is a waste, but TSShape must create server objects. TSShapeInstance might work, but i do not understand how you set its transform.
The basic question here is how do you load and move shapes just on the client and not transmit that movement info over the net and not have it even exist at all on server.
Thank you!
About the author
www.martianarctic.com
Torque 3D Owner Devin Passage
if(mShapeYouWantToDrawInstance) { MatrixF worldMat = getRenderTransform(); //worldMat.setColumn(3, Point3F(0.0f,0.0f,0.0f)); MatrixF prevMat = GFX->getWorldMatrix(); GFX->setWorldMatrix(worldMat); TSRenderState rdata; rdata.setSceneState( state ); mShapeYouWantToDrawInstance->render( rdata); GFX->setWorldMatrix(prevMat); }where mShapeYouWantToDrawInstance is a TSShapeInstance, created by ResourceManager, and where you want to put it, just move it relative to the matrix provided by GetRenderTransform.
Let me know if i'm doing anything grossly wrong here, if so inclined.