From c3afbf768976ccbb9e4c73cd31b50bc10f24194b Mon Sep 17 00:00:00 2001 From: yunfeibai Date: Tue, 19 Apr 2016 14:19:18 -0700 Subject: [PATCH] set desired position target --- examples/SharedMemory/PhysicsClientExample.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/examples/SharedMemory/PhysicsClientExample.cpp b/examples/SharedMemory/PhysicsClientExample.cpp index c203a3b36..7e9c0119c 100644 --- a/examples/SharedMemory/PhysicsClientExample.cpp +++ b/examples/SharedMemory/PhysicsClientExample.cpp @@ -16,7 +16,9 @@ struct MyMotorInfo2 { btScalar m_velTarget; btScalar m_maxForce; + btScalar m_posTarget; int m_uIndex; + int m_qIndex; }; @@ -40,6 +42,7 @@ public: //@todo, add accessor methods MyMotorInfo2 m_motorTargetVelocities[MAX_NUM_MOTORS]; + MyMotorInfo2 m_motorTargetPositions[MAX_NUM_MOTORS]; int m_numMotors; @@ -136,10 +139,14 @@ public: { for (int i=0;im_velTarget = 0.f; motorInfo->m_uIndex = info.m_uIndex; + motorInfo->m_qIndex = info.m_qIndex; SliderParams slider(motorName,&motorInfo->m_velTarget); slider.m_minVal=-4;