pointLight object receiving advanceTime on client and server
by Nicolas Buquet · in Torque 3D Professional · 10/21/2009 (10:37 am) · 2 replies
Hi,
I made a pointLight object mounted on a controller object.
As I'm diving into T3D C++ side to be knowledgeable about processTick/interpolateTick/advanceTime, it appears that the dynamically created pointLight (made in TorqueScript in the onClientEnterGame function) receive advanceTime call on the object created on the server, and on the ghost propagated on the client.
I'm on a localConnection configuration (client and server are the same app).
The server pointLight object (named pLight) has an ID 3312 (in general) and the ghost is 3354.
It seems the ghost has no name. Is it normal ?
What is very strange, the 2 pointLight object (the original and the ghost), receive advanceTime call from the clientProcess method !
The stack call is ProcessTimeEvent / clientProcess / ITickable::advanceTime / advanceTime on my objects.
And I make a Con::printf in the lightBase.cpp / advanceTime method, in which I test isGhost().
On one object (the first created, the low id), isGhost is false (normal), and on the other (the high id), isGhost is true.
I tracked in debugger the ghosting process, and all seems normal, except the name not present.
I was thinking the advanceTime was only called on the client side, for client animation. My controlObject shape does get its advanceTime method called only on the client side.
So, is it normal; where is the truth ? ;-)
Nicolas Buquet
www.buquet-net.com/cv/
I made a pointLight object mounted on a controller object.
As I'm diving into T3D C++ side to be knowledgeable about processTick/interpolateTick/advanceTime, it appears that the dynamically created pointLight (made in TorqueScript in the onClientEnterGame function) receive advanceTime call on the object created on the server, and on the ghost propagated on the client.
I'm on a localConnection configuration (client and server are the same app).
The server pointLight object (named pLight) has an ID 3312 (in general) and the ghost is 3354.
It seems the ghost has no name. Is it normal ?
What is very strange, the 2 pointLight object (the original and the ghost), receive advanceTime call from the clientProcess method !
The stack call is ProcessTimeEvent / clientProcess / ITickable::advanceTime / advanceTime on my objects.
And I make a Con::printf in the lightBase.cpp / advanceTime method, in which I test isGhost().
On one object (the first created, the low id), isGhost is false (normal), and on the other (the high id), isGhost is true.
I tracked in debugger the ghosting process, and all seems normal, except the name not present.
I was thinking the advanceTime was only called on the client side, for client animation. My controlObject shape does get its advanceTime method called only on the client side.
So, is it normal; where is the truth ? ;-)
Nicolas Buquet
www.buquet-net.com/cv/
About the author
Recent Threads
#2
Torque Community and dev team are relly great.
Nicolas Buquet
www.buquet-net.com/cv/
10/22/2009 (3:34 am)
Thank you very much for your quick answer.Torque Community and dev team are relly great.
Nicolas Buquet
www.buquet-net.com/cv/
Associate Tom Spilman
Sickhead Games
Thats a known curiosity of how ITickable derived classes like LightBase work... but its not a bug or a problem.
You want LightBase::advanceTime() called on the server so that if its mounted it will move the light position for proper ghosting.
If you wanted to do something only on the client in advanceTime() add a isClientObject() test.