work-in-progress
add UDP network connection for physics client <-> server. also set spinning friction in rolling friction demo (otherwise objects may keep on spinning forever)
This commit is contained in:
21
examples/SharedMemory/PhysicsClientUDP_C_API.cpp
Normal file
21
examples/SharedMemory/PhysicsClientUDP_C_API.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
#include "PhysicsClientUDP_C_API.h"
|
||||
#include "PhysicsClientUDP.h"
|
||||
#include "PhysicsDirect.h"
|
||||
#include <stdio.h>
|
||||
|
||||
//think more about naming. The b3ConnectPhysicsLoopback
|
||||
b3PhysicsClientHandle b3ConnectPhysicsUDP(const char* hostName, int port)
|
||||
{
|
||||
|
||||
UdpNetworkedPhysicsProcessor* udp = new UdpNetworkedPhysicsProcessor(hostName, port);
|
||||
|
||||
PhysicsDirect* direct = new PhysicsDirect(udp);
|
||||
|
||||
bool connected = direct->connect();
|
||||
printf("direct!\n");
|
||||
return (b3PhysicsClientHandle)direct;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user