
I want to ask how i can a wallbounce add?
For the ground i use this here:
Code: Select all
// calculate the exact velocity on landing
dist = pm->ps->origin[2] - pml.previous_origin[2];
vel = pml.previous_velocity[2];
acc = -pm->ps->gravity;
//newq3ball
pm->ps->velocity[2] = -vel * 0.5; //2
if (pm->ps->velocity[2] <= 0.001) {
pm->ps->velocity[2] = 0;

Can anybody help me to add this?
Or is it to hard to add this!?
Thx for helping me out!