Unity thing orientation is updated, but not correct yet
This commit is contained in:
parent
5ef609fd12
commit
a9d7c6d145
@ -42,6 +42,8 @@ namespace RoboidControl.Unity {
|
|||||||
Participant participant = remoteParticipant.AddComponent<Participant>();
|
Participant participant = remoteParticipant.AddComponent<Participant>();
|
||||||
participant.coreParticipant = e.participant;
|
participant.coreParticipant = e.participant;
|
||||||
participant.coreParticipant.component = participant;
|
participant.coreParticipant.component = participant;
|
||||||
|
participant.ipAddress = e.participant.ipAddress;
|
||||||
|
participant.port = e.participant.port;
|
||||||
break;
|
break;
|
||||||
case ThingMsg.id:
|
case ThingMsg.id:
|
||||||
HandleThingEvent(e);
|
HandleThingEvent(e);
|
||||||
|
@ -260,6 +260,7 @@ namespace RoboidControl.Unity {
|
|||||||
/// This can update the position and/or orientation when the velocity of the thing is zero.
|
/// This can update the position and/or orientation when the velocity of the thing is zero.
|
||||||
/// If a velocity is not zero, the position and/or orientation update will be ignored
|
/// If a velocity is not zero, the position and/or orientation update will be ignored
|
||||||
protected virtual void HandlePose() {
|
protected virtual void HandlePose() {
|
||||||
|
this.transform.localRotation = core.orientation.ToQuaternion();
|
||||||
if (core.linearVelocity.distance == 0)
|
if (core.linearVelocity.distance == 0)
|
||||||
this.transform.localPosition = core.position.ToVector3();
|
this.transform.localPosition = core.position.ToVector3();
|
||||||
if (core.angularVelocity.distance == 0)
|
if (core.angularVelocity.distance == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user