AlexZ
July 29, 2010, 7:26pm
1
Hi All,
Does anyone have this working?
Im using the typical networkRigidBody to sync my players over network, but locomotion wont animate their legs, they kinda just drag behind.
Debugging locomotion shows that it anticipates no steps? Any idea whats going on?
Thanks!
Alex
I also had this problem before…
I remember I solved it by changing the animation legs values.
I don’t remember how the script is called - maybe AnimationLegs… but it has alot of values u can edit…
so u need to play with them till u get something which is cool to be seen in networking…
Goodluck~
Hi!
Yes sombody should do a tutorial how to use Locomotion system with network!
Go to http://feedback.unity3d.com/forums/17490-unity-demos and vote on my proposals on the wishlist!
Networking demo with the Locomotion system?
Please vote!
AlexZ
July 30, 2010, 3:56pm
4
Thanks for the reply guys.
I tried setting every possible setting inside LegAnimator with no luck.
Could you please provide more detail to the solution, this has been haunting me for days :s
I voted for the tutorial, thanks.
Thank you,
Alex
Hi
I have made working solution and it gives quite smooth movement on remote client.
Now it’s beeing tested throughoutly, and should be availaible in 2-3 days.
Greets
Hi Rychu!
Sounds nice that you have made a test! Is it a tutorial? Can´t wait to see it!
Thanks in advance!
jedy
August 7, 2010, 11:14pm
8
Just tried to combine networking in locomotion. Pretty troublesome, still can’t get it to work properly.
Why dont they have an example of locomotion over network??? If I would have made the locomotion system so I’d be interested to know if it works over the network!
Please Runevision make one!!!
Over 400 have look into this post, and only two have vote!!!???
Please vote on the wishlist!!! Locomotion system with network!
AlexZ
August 12, 2010, 1:19pm
10
Bump…
anyone have a solution for this? Please
I think, it’s possible, but only for a few net connections.
Hi guys!
I must admit it took us more than we expected, but we’ve finally done it.
With satisfaction we introduce to you Locomotion Networking, finally ready and working!
Full description with online demo can be found here:
[http://unitydevs.com/item/locomotion-networking/
](http://unitydevs.com/item/locomotion-networking/ )
We hope you’ll find it useful!
SJAM
August 30, 2010, 10:21am
13
JUST REMPLACE IN ALIGNEMENTTRACKER.CS (locomotion 0.9.x or later):
private void UpdateTracking() {
m_Position = transform.position;
m_Rotation = transform.rotation;
// charactercontroller is not reliable in first frame
if (firstFrame) { firstFrame = false; return; }
if (m_CharacterController!=null) {
Vector3 ccVelocity = m_CharacterController.velocity;
m_Velocity = ccVelocity;
m_AngularVelocity = CalculateAngularVelocity(m_RotationPrev, m_Rotation);
}
else if (m_RigidBody!=null) {
// Rigidbody velocity is not reliable, so we calculate our own
m_Velocity = (m_Position-m_PositionPrev)/Time.deltaTime;
// Rigidbody angularVelocity is not reliable, so we calculate out own
m_AngularVelocity = CalculateAngularVelocity(m_RotationPrev, m_Rotation);
}
else {
m_Velocity = (m_Position-m_PositionPrev)/Time.deltaTime;
m_AngularVelocity = CalculateAngularVelocity(m_RotationPrev, m_Rotation);
}
m_Acceleration = (m_Velocity-m_VelocityPrev) / Time.deltaTime;
m_PositionPrev = m_Position;
m_RotationPrev = m_Rotation;
m_VelocityPrev = m_Velocity;
}
BY
private void UpdateTracking() {
m_Position = transform.position;
m_Rotation = transform.rotation;
// charactercontroller is not reliable in first frame
if (firstFrame) { firstFrame = false; return; }
m_Velocity = (m_Position-m_PositionPrev)/Time.deltaTime;
m_AngularVelocity = CalculateAngularVelocity(m_RotationPrev, m_Rotation);
m_Acceleration = (m_Velocity-m_VelocityPrev) / Time.deltaTime;
m_PositionPrev = m_Position;
m_RotationPrev = m_Rotation;
m_VelocityPrev = m_Velocity;
}
And Enjoy !!
What does the code make for difference may I ask? Cant see the difference when I walk the Character!
What was wrong with it before?
Thanks for a reply!
SJAM
August 30, 2010, 5:19pm
16
When your character is “remote”, the character controler is inactive but exist.
if (m_CharacterController!=null) //TRUE BECAUSE EXIST
{
Vector3 ccVelocity = m_CharacterController.velocity; //No Effect Because it’s the network script that make translation and rotation, not the “Character Controler”
m_Velocity = ccVelocity;
m_AngularVelocity = CalculateAngularVelocity(m_RotationPrev, m_Rotation);
} <----STOP HERE
else if (m_RigidBody!=null) {
// Rigidbody velocity is not reliable, so we calculate our own
m_Velocity = (m_Position-m_PositionPrev)/Time.deltaTime;
// Rigidbody angularVelocity is not reliable, so we calculate out own
m_AngularVelocity = CalculateAngularVelocity(m_RotationPrev, m_Rotation);
}
else {
m_Velocity = (m_Position-m_PositionPrev)/Time.deltaTime;
m_AngularVelocity = CalculateAngularVelocity(m_RotationPrev, m_Rotation);
}
Result : AlignementTracker do not find Controller.velocity
With my modification,the detection of movement work for All translation/rotation of charcater (rigidbody, character controler and remote script).
Sorry my english is very bad
Azert2k thanks for this code info!!!
AlexZ
August 31, 2010, 6:17pm
19
Great thank you very much
Hi! Help me pleas!!!
is not work
Assets/Locomotion System/AlignmentTracker.cs(90,35): error CS0103: The name `firstFrame’ does not exist in the current context