WallBounce

Locked
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

WallBounce

Post by Landix »

Huhu :)

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;
I would that the BALL bounce from Walls, too. "A little ping pong" :)

Can anybody help me to add this?
Or is it to hard to add this!?

Thx for helping me out!
[img]http://www.q3geoball.quakeit.de/files/landix.jpg[/img]
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: WallBounce

Post by ^misantropia^ »

Take a look at G_BounceMissile() in game/g_missile.c, that should put you on the right track.
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Re: WallBounce

Post by Landix »

I absolute can not figured out.
I think i know it works and i think it must be add to bg_pmove.c under crashland.

But i bring it not to work :(

BTW!
Here some new screens:

http://www.q3geoball.quakeit.de/forum/v ... .php?t=157
[img]http://www.q3geoball.quakeit.de/files/landix.jpg[/img]
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Re: WallBounce

Post by Landix »

Somebody offer me some code? :) Plz

*duck*
[img]http://www.q3geoball.quakeit.de/files/landix.jpg[/img]
Locked