Jolt Physics. Персонаж скользит по полу, как будто на льдуC++

Программы на C++. Форум разработчиков
Anonymous
Jolt Physics. Персонаж скользит по полу, как будто на льду

Сообщение Anonymous »

Даже если я создаю персонажа с трением 0,99, он скользит по полу. Я также пытался изменить трение пола, но это не изменило предыдущего поведения. Это показывает, что скорость медленно уменьшается не внезапно, когда ее не добавляется. < /P>

Код: Выделить всё

#include 

// Jolt includes
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 

// STL includes
#include 
#include 
#include 

// Disable common warnings triggered by Jolt, you can use JPH_SUPPRESS_WARNING_PUSH / JPH_SUPPRESS_WARNING_POP to store and restore the warning state
JPH_SUPPRESS_WARNINGS

// All Jolt symbols are in the JPH namespace
using namespace JPH;

// If you want your code to compile using single or double precision write 0.0_r to get a Real value that compiles to double or float depending if JPH_DOUBLE_PRECISION is set or not.
using namespace JPH::literals;

// We're also using STL classes in this example
using namespace std;

// Callback for traces, connect this to your own trace function if you have one
static void TraceImpl(const char *inFMT, ...)
{
// Format the message
va_list list;
va_start(list, inFMT);
char buffer[1024];
vsnprintf(buffer, sizeof(buffer), inFMT, list);
va_end(list);

// Print to the TTY
cout 

Подробнее здесь: [url]https://stackoverflow.com/questions/79770672/jolt-physics-the-character-slides-across-the-floor-as-if-on-ice[/url]

Вернуться в «C++»