Physics Playermodel q3geoball-MOD[solved]

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

Physics Playermodel q3geoball-MOD[solved]

Post 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
Last edited by Landix on Sat Mar 10, 2007 8:32 am, edited 2 times in total.
TTK-Bandit
Posts: 190
Joined: Sat Sep 07, 2002 7:00 am

Post 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.
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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
TTK-Bandit
Posts: 190
Joined: Sat Sep 07, 2002 7:00 am

Post 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.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post 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?
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post by Landix »

I have no info for a book post, can you give me the title again plz.


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

Post 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
TTK-Bandit
Posts: 190
Joined: Sat Sep 07, 2002 7:00 am

Post 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
4days
Posts: 5465
Joined: Tue Apr 16, 2002 7:00 am

Post 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'.
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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 :)
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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
TTK-Bandit
Posts: 190
Joined: Sat Sep 07, 2002 7:00 am

Post 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
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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 ?
TTK-Bandit
Posts: 190
Joined: Sat Sep 07, 2002 7:00 am

Post 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.
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

Landix wrote:Can i post some code here for help?
Sure, go ahead.
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

!

Post 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.
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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:
TTK-Bandit
Posts: 190
Joined: Sat Sep 07, 2002 7:00 am

Post 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/
Landix
Posts: 123
Joined: Wed Feb 28, 2007 5:57 pm

Post 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.
Locked