/
redgpu
/
bullet
ОбзорДокументацияВойти
/
redgpu
/
bullet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
ДокументацияПоддержка
Политика конфиденциальностиПользовательское соглашениеПолитика использования «cookies»Согласие субъекта персональных данных
2026 ©
bullet/
.../pybullet/unity3d/
..
autogen

update autogenerated NativeMethods.cs from latest PhysicsClientC_Api.h

9 лет назад
examples

update unity3d/examples/NewBehaviourScript.cs to load a plane and cube, synchronize the world transform added debug rendering from CjLib (with DrawLine from my fork here: https://github.com/erwincoumans/unity-cj-lib)

9 лет назад
readme.txt

Quick first prototype/test to integrate pybullet into Unity, see readme.txt for details.

9 лет назад
readme.txt
Quick prototype to connect Unity 3D to pybullet
 
Generate C# Native Methods using the Microsoft PInvoke Signature Toolkit:
 
sigimp.exe /lang:cs e:\develop\bullet3\examples\SharedMemory\PhysicsClientC_API.h
 
Add some #define B3_SHARED_API __declspec(dllexport) to the exported methods,
replace [3], [4], [16] by [] to get sigimp.exe working.
 
This generates autogen/NativeMethods.cs
 
Then put pybullet.dll in the right location, so Unity finds it.
 
NewBehaviourScript.cs is a 1 evening prototype that works within Unity 3D:
Create a connection to pybullet, reset the world, load a urdf at startup.
Step the simulation each Update.
 
Now the real work can start, converting Unity objects to pybullet,
pybullet robots to Unity, synchronizing the transforms each Update.
 
void Start () {
IntPtr pybullet = b3ConnectSharedMemory(12347);
IntPtr cmd = b3InitResetSimulationCommand(pybullet);
IntPtr status = b3SubmitClientCommandAndWaitStatus(pybullet, cmd);
cmd = b3LoadUrdfCommandInit(pybullet, "plane.urdf");
status = b3SubmitClientCommandAndWaitStatus(pybullet, cmd);
}
 
void Update ()
{
IntPtr cmd = b3InitStepSimulationCommand(pybullet);
IntPtr status = b3SubmitClientCommandAndWaitStatus(pybullet, cmd);
}