Update remote thing pose
This commit is contained in:
parent
ba81b9f71d
commit
48d538a73a
@ -133,8 +133,8 @@ namespace RoboidControl.Unity {
|
|||||||
rb.velocity = 0.9f * rb.velocity + 0.1f * forwardSpeed * transform.forward;
|
rb.velocity = 0.9f * rb.velocity + 0.1f * forwardSpeed * transform.forward;
|
||||||
rb.angularVelocity = 0.9f * rb.angularVelocity + 0.1f * turningSpeed * Vector3.up;
|
rb.angularVelocity = 0.9f * rb.angularVelocity + 0.1f * turningSpeed * Vector3.up;
|
||||||
|
|
||||||
core.position = LinearAlgebra.Spherical.FromVector3(this.transform.localPosition);
|
core.ReplacePosition(LinearAlgebra.Spherical.FromVector3(this.transform.localPosition));
|
||||||
core.orientation = LinearAlgebra.SwingTwist.FromQuaternion(this.transform.localRotation);
|
core.ReplaceOrientation(LinearAlgebra.SwingTwist.FromQuaternion(this.transform.localRotation));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -316,6 +316,10 @@ namespace RoboidControl {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool positionUpdated = false;
|
public bool positionUpdated = false;
|
||||||
|
|
||||||
|
public void ReplacePosition(Spherical newPosition) {
|
||||||
|
this._position = newPosition;
|
||||||
|
}
|
||||||
|
|
||||||
private SwingTwist _orientation = SwingTwist.zero;
|
private SwingTwist _orientation = SwingTwist.zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The orientation of the thing in local space
|
/// The orientation of the thing in local space
|
||||||
@ -336,6 +340,10 @@ namespace RoboidControl {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool orientationUpdated = false;
|
public bool orientationUpdated = false;
|
||||||
|
|
||||||
|
public void ReplaceOrientation(SwingTwist newOrientation) {
|
||||||
|
this._orientation = newOrientation;
|
||||||
|
}
|
||||||
|
|
||||||
private Spherical _linearVelocity = Spherical.zero;
|
private Spherical _linearVelocity = Spherical.zero;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The linear velocity of the thing in local space in meters per second
|
/// The linear velocity of the thing in local space in meters per second
|
||||||
|
Loading…
x
Reference in New Issue
Block a user