Page 1 of 1

Physics Playermodel q3geoball-MOD[solved]

Posted: Wed Feb 28, 2007 5:59 pm
by Landix
Hi,

i try to make that the Player on an inclined plane automatical
move down to the end. I do not will use the "slick_function"
The Animation from the Playerlegs should do this to.

Is this possible for Someone to make this in the code?

I have change some code for my MOD but i can not do this on an
inclined plane.

Also i am looking for a coder that can me help to make the physics of the BALL more better hotter :)

the alpha 00.01 version of the mode is here:
http://www.q3geoball.quakeit.de/loads/

if you can help me plz contact me.

thx for reading an sorry for my bad english

Posted: Wed Feb 28, 2007 7:18 pm
by TTK-Bandit
really landix learn programming first.. you have started this mod a few days back with no coding experience at all.. start learning programming for 2-3 weeks and then ask for help to create this code instead of asking for the code itself.
no offense, but mod making needs time, especially if you have no experience.
or look for a programmer who is willing to help you programming the mod.

btw if slick does everything you want, just with no animation, you could just adapt the code to do the animation based on the movement direction/speed.

Posted: Wed Feb 28, 2007 7:26 pm
by Landix
TTK-Bandit wrote: or look for a programmer who is willing to help you programming the mod.
Thats what i am looking for, but i will do also something on my own.

I have 2 kids and a wife + much work @ the company, so i have not enough time to learn much c++ code to do that.

I will but i have not enough spare time for that.

So i am looking for a coder and will do something self.

but thx for your answer

Posted: Wed Feb 28, 2007 8:17 pm
by TTK-Bandit
you dont need to learn C++, you just need C, thats much less.
just check out the book I told you on pq forums, its not that big.

Posted: Wed Feb 28, 2007 8:27 pm
by ^misantropia^
To get things straight: you have no experience with C and therefore require someone else to write the actual code.

You do however intend to do "something" yourself.

Pray, what be this thing?

Posted: Wed Feb 28, 2007 8:28 pm
by Landix
I have no info for a book post, can you give me the title again plz.


thx
Landix

Posted: Wed Feb 28, 2007 8:31 pm
by Landix
^misantropia^ wrote:To get things straight:
You do however intend to do "something" yourself.

Pray, what be this thing?

I can a little model, making a website for the mod and will do something for the art. Menue and Skyboxes.

I do a lot of things to make the MOD ready.

I hope i could it make easier to understand

Posted: Thu Mar 01, 2007 12:45 am
by TTK-Bandit
argl, I'm sorry, hit me in the face, I got confused and thought you where someone else :\
I did you wrong, and I hope you'll accept my apologies

the book title is "Programmieren in C " by Kernighan/Ritchie

Posted: Thu Mar 01, 2007 1:36 am
by 4days
TTK-Bandit wrote:argl, I'm sorry, hit me in the face, I got confused and thought you where someone else :\
I did you wrong, and I hope you'll accept my apologies
:olo:

google's not being very cooperative, and this might be what's happening in the mod already - but i remember seeing a tutorial a long time ago that showed how to dynamically rotate a shader/texture on a model - i think it was for a 'radar' effect or something like that.

if the mod is about a ball getting bounced about, then that might be an easy way to handle its looks. a shader that changed its scrolling direction and speed depending (like bandit said) on the movement direction/speed of the 'ball'.

Posted: Thu Mar 01, 2007 7:06 am
by Landix
TTK-Bandit wrote:argl, I'm sorry, hit me in the face, I got confused and thought you where someone else :\
I did you wrong, and I hope you'll accept my apologies

the book title is "Programmieren in C " by Kernighan/Ritchie
No prob, i will accept :)

Posted: Thu Mar 01, 2007 7:09 am
by Landix
The shader thing hears interesting. i will try this out.

But i have the Ball animated in the model, so the rotation is in the direction the player move in. forward backward left right.

Accerlation is the problem and the movement on an inclined plane.

i will try

Posted: Thu Mar 01, 2007 1:10 pm
by TTK-Bandit
a shader would imho be more complex to do..
if you just use a static ball model and rotate it from the sdk, it would probably look better than an animated shader.
check out the CG_PlayerAngles function in cg_players.c

Posted: Thu Mar 01, 2007 4:15 pm
by Landix
i will check this in the sdk

what do you think
change the ANIMATION or change THE
CG_PlayerAngles function in cg_players.c ?

Posted: Thu Mar 01, 2007 4:40 pm
by TTK-Bandit
I think you dont need any animations for a ball, except maybe squeezing the ball a little when you jump :D
changing the CG_PlayerAngles function should look perfect.

Posted: Thu Mar 01, 2007 7:43 pm
by Landix
Ok then i try this out at the weekend.

The jumping i will turn completly off, but when the ball falls down i can build in a little "kickback" an the squeezing... i hope.

k thx for the suggestion

i let hear from me later

Posted: Sat Mar 03, 2007 8:24 pm
by Landix
http://www.q3geoball.quakeit.de/loads/

there is the current Version, with a test map and some sounds.

Someone will make the Ball smoother? :)

When i make the Ball smoother in max the Animation goes away :(

I can not change the code so how i will, but this looks like a start :)

If anybody interest to help me, i will get happy then.

And yes i will turn off the jumping.

and i have buy the book.... wait for delivery.

thx for reading my bad english

Posted: Wed Mar 07, 2007 6:40 am
by Landix
Status....

I can make 1 full Roll Move without animation, i have a new smoother Model and you can not longer jump!

So after the Roll he turn all back and i can make only make 1 full Rollmove it is not looping.

Can i post some code here for help?

thx
Landix hard @ work

Posted: Wed Mar 07, 2007 6:00 pm
by ^misantropia^
Landix wrote:Can i post some code here for help?
Sure, go ahead.

Posted: Wed Mar 07, 2007 6:27 pm
by Landix
This make the ROLL, but only one time, when i hold forward, it is not looping.
The Pitch code before i turned off, i think i do not need this.

Code: Select all

[color=red]	VectorCopy( cent->currentState.pos.trDelta, velocity );
	speed = VectorNormalize( velocity );
	if ( speed ) {
		vec3_t	axis[3];
		float	side;

		speed *= 1.00f; //0.05f  speed of the ROLL

		AnglesToAxis( legsAngles, axis );
		side = speed * DotProduct( velocity, axis[1] );
		legsAngles[ROLL] -= side;

		side = speed * DotProduct( velocity, axis[0] ); //[0]
		legsAngles[PITCH] += side;
	}[/color]
I do not understand where i can do this so, that the LEGS do the ROLL for ever to the directions i want.

I try to explain what i have do yet.
Turn off Head and torso, only LEGS are needed, so i make a Model, the BALL for the Legs, all directions works, i have screwed on the friction, speed, gravity etc...
Before i use the Animationfile from the model to make the ROLL, but Bandit means it could solve in the code over the player angles.

I will do this that way. thx for reading

!

Posted: Thu Mar 08, 2007 6:29 am
by Landix
I hope i am right!

Axis [3] is Legs axis! right?

I have change the [1] and the [0] to [1] and [3]

and a Roll is running, but absolute not under control.
The Speed i set higher, so when the ball has only a uni Textur nobody see that. :))

I can not do this better yet.

The Ball looks first good and he is rolling.
So i will go on with some mapping.

I am open for any help.
I will release the New Website and a little alpha next Weekend.

Posted: Thu Mar 08, 2007 10:07 am
by Landix
It seems to be that i was not not in school at this time::

* Pitch is rotation around the lateral or transverse axis—an axis running from the pilot's left to right in piloted aircraft, and parallel to the wings of a winged aircraft; thus the nose pitches up and the tail down, or vice-versa.

* Roll is rotation around the longitudinal axis—an axis drawn through the body of the vehicle from tail to nose in the normal direction of flight, or the direction the pilot faces.
o The roll angle is also known as bank angle on a fixed wing aircraft, which "banks" to change the horizontal direction of flight.

* Yaw is rotation about the vertical axis—an axis drawn from top to bottom, and perpendicular to the other two axes.

I go on and repeat later when i have finished

Posted: Fri Mar 09, 2007 12:52 am
by Landix
I do not know how this work, can everybody help me plz?

i want only the ball rolling.

All what the ball do is make a 360° and stop when i press forward
after release the button i goes -360°

So i will always a roll when i go forward left right back.

maybe someone? :icon27:

Posted: Fri Mar 09, 2007 12:58 pm
by TTK-Bandit
replace the content of the CG_PlayerAngles function with this:

Code: Select all

	vec3_t		legsAngles;
	vec3_t		velocity;
	float			speed;
	
	// lean towards the direction of travel
	VectorCopy( cent->currentState.pos.trDelta, velocity );
	speed = VectorNormalize( velocity );
	
	if ( speed ) {
		speed *= 0.05f;
		cent->pe.legs.pitchAngle += speed;
	}
	vectoangles(velocity, legsAngles);
	legsAngles[ROLL] = 0;
	legsAngles[PITCH] = cent->pe.legs.pitchAngle;
	
	AnglesToAxis( legsAngles, legs );
oh btw, you should try my little ide for q3 programming:
http://q3devel.6x.to/

Posted: Fri Mar 09, 2007 4:19 pm
by Landix
Absolute Great!

Very Thx Bandit.

So i will more tune some things and can release the alpha next WE :)

stay tuned!


And very thx again for your help.