Hi Aik-Siong Koh,
the velocity behavior is a good idea I think. I'm right now working on reducing the network traffic for avatar movement.
If you wanna change the navigation system please have a look at:
* the hierarchy of
TAvatarUser
TAvatarUserMenu
TAvatarUserAnimated
TCobaltAvatar
in there the events get processed, have a look especially in
TCobaltAvatar >> keyStroke:
* The actions get replicated to the corresponding replicas ... have a look at TAvatarReplicaAnimated that is used
* important for the actual movement is right now the method driveStep
this is a step method that is invoked so far in the replica so have a close look at
TAvatarUserAnimated >> driveStep that send driveStep to the replica ...
TAvatarReplica >> driveStep and in there the important call is the method drive
* TAvatarReplica >> drive in here the speed value is controlled
* TAvatarUser is also replicated the moveForward: methods to the replica so that you definitely have to have a look in
TAvatarReplica >> moveForward:
TAvatarReplica >> moveBack:
etc. where the actual repositioning is happening with resetting the translation of the avatar
As you can see a lot a lot of overload here on the avatar side. I'm especially trying to delete the driveStep calls because they go over the wire and are not very practical.
Please keep me posted if this information was helpful enough or if you need more. I also would like to know how your implementation works out. Just please keep in mind to set an upper border for velocity movement otherwise we have a rocket as avatar ;)
Best regards,
Martin
askoh wrote
Most navigation is position control: press key to change position. But I
think that velocity control might be more suitable in avatar control.
Press key to change velocity of avatar. This is just like the cruise
control in cars. It is also the mode used in the space shuttle joy stick.
I would like to experiment with velocity control in Cobalt. How can I do
that? What classes and methods should I look at?
Thanks,
Aik-Siong Koh