Gamestudio Links
Zorro Links
Newest Posts
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, Nymphodora), 7,090 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 5 1 2 3 4 5
Re: drehendes zahnrad ? [Re: rojart] #420917
04/06/13 14:44
04/06/13 14:44
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: drehendes zahnrad ? [Re: WretchedSid] #420918
04/06/13 14:52
04/06/13 14:52
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Ich hatte schon Ahnung, dass da etwas weg muss (valid=479.80619733184&), danke! grin


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: drehendes zahnrad ? [Re: rojart] #420919
04/06/13 15:51
04/06/13 15:51
Joined: Oct 2008
Posts: 341
R
ratz Offline OP
Senior Member
ratz  Offline OP
Senior Member
R

Joined: Oct 2008
Posts: 341
lese ich gerade: so gehts: "downloadlink"
und lade das runter... grin

ich dachte dass jemnd sich das schon angeschaut hätte tongue
were super nett wenn jmd. fehler beheben könnte
ich weis nächmlich solangsam nicht mehr weiter ^^

Re: drehendes zahnrad ? [Re: ratz] #420951
04/07/13 14:30
04/07/13 14:30
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
1. Also unter deine my_wheel() action, me.roll mit me.x ändern bitte, sonst ist deine shape hull nicht da, wo es sein sollte.

Code:
ENTITY* shape2 = ent_create("add_shape.mdl",me.roll,NULL); // Simple box für die Zähne


2. Du versuchst zwei kinematische hulls miteinander zu bewegegen, was in der SDK physX nicht funktioniert, versuche es für die easy_wheel() action mit PH_6DJOINT.


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: drehendes zahnrad ? [Re: rojart] #420970
04/07/13 19:13
04/07/13 19:13
Joined: Oct 2008
Posts: 341
R
ratz Offline OP
Senior Member
ratz  Offline OP
Senior Member
R

Joined: Oct 2008
Posts: 341
grin super es bewegt sich !!!

vorweg: ich hab mir jetzt auch diesen Debugger geholt ... geil!

easy_wheel hat jetzt die funtion:
Code:
pXent_setbodyflag(me,PH_6DJOINT,1);



aber es fällt beim bewegen langsam richtung boden


und aus my.roll hab ich wieder x gemacht, da das Shape
sonst eiert beim drehen

frage: gibt es ein body flag, was das easy wheel einfach nur drehen lassen kann ohne extras ?

Re: drehendes zahnrad ? [Re: ratz] #420972
04/07/13 20:34
04/07/13 20:34
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
pXent_setbodyflag(me,PH_6DJOINT,1); ist definitiv falsch, sehe im Handbuch nach, das da kein PH_6DJOINT flag mit der funktion gibt.

Ich benutze pXcon_add, hier mein code für die zweite action:

Code:
action parent_gear() {
	
	ENTITY* shape2 = ent_create("addShape.mdl",me.x,NULL);
	set(shape2, INVISIBLE);
	
	c_setminmax(me);
	
	pXent_settype(me,PH_RIGID,PH_SPHERE);
	
	var i;
	for (i=10; i<360; i+=72) {
		shape2.roll = i;
		pXent_addshape(me, shape2, PH_BOX);
	}

	pXent_removeshape(my, 0);
	
	var Motion[6] = { 0,0,0,0,NX_D6JOINT_MOTION_FREE,0};

	pXcon_add(PH_6DJOINT,me,NULL,0);

	pXcon_set6djoint(me,Motion,NULL);
}



Es gibt noch eine möglichkeit das ganze automatisch als motor zu betreiben, sehe unter pXcon_setmotor nach.


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: drehendes zahnrad ? [Re: rojart] #421018
04/08/13 15:56
04/08/13 15:56
Joined: Oct 2008
Posts: 341
R
ratz Offline OP
Senior Member
ratz  Offline OP
Senior Member
R

Joined: Oct 2008
Posts: 341
jaaaaaaaa !!!! es tuts laugh

danke für alles!

::hier der ganze Code::

Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
#include <ackphysX.h>
///////////////////////////////
  
function main()
{
 physX_open(); 
 level_load("room.WMB");
}


action easy_wheel()
{	
	ENTITY* shape2 = ent_create("add_shape.mdl",me.x,NULL);
	set(shape2, INVISIBLE);
	
	c_setminmax(me);
	
	pXent_settype(me,PH_RIGID,PH_SPHERE);
	
	var i;
	for (i=10; i<360; i+=72) {
		shape2.roll = i;
		pXent_addshape(me, shape2, PH_BOX);
	}

	pXent_removeshape(my, 0);
	
	var Motion[6] = { 0,0,0,0,NX_D6JOINT_MOTION_FREE,0};

	pXcon_add(PH_6DJOINT,me,NULL,0);

	pXcon_set6djoint(me,Motion,NULL);
}


 action my_wheel()
 {
 	
	pXent_settype(me,PH_RIGID,PH_CONVEX);
  
	ENTITY* shape2 = ent_create("add_shape.mdl",me.x,NULL); // Simple box für die Zähne
	set(shape2, SHOW);
	
   c_setminmax(me);
	
	// Insgesamt 5 Zähne werden Gebraucht mit 10° anfangs Winkel

	var i;
	for (i=10; i<360; i+=72) {
		shape2.roll = i;
		pXent_addshape(me, shape2, PH_BOX);
	}

	pXent_removeshape(me, 0); // entfernt eine zuvor hinzugefügte PH_SPHERE Form 
	
	pXent_setbodyflag(me,NX_BF_KINEMATIC,1); // aktiviert kinematische Steuerung
	
	
	// Steuerung Schleife
	ANGLE angle;
	while(1) 
	{
		if (key_j) {
			angle.roll += -8* time_step;  	 
			pXent_rotate(me, nullvector, vector(0,0,angle.roll));	
		}
		if (key_k) {
			angle.roll += 8* time_step;  	 
			pXent_rotate(me, nullvector, vector(0,0,angle.roll));	
		}
		wait(1);
	}
}


Re: drehendes zahnrad ? [Re: ratz] #421024
04/08/13 17:10
04/08/13 17:10
Joined: Oct 2008
Posts: 341
R
ratz Offline OP
Senior Member
ratz  Offline OP
Senior Member
R

Joined: Oct 2008
Posts: 341
laugh ja... ich hab nochmals nen paar experimente gemacht

Folgendes sollte noch nachgetragen werden:

wenn man ein zahnrad haben will welches sich seitlich bewegen soll
braucht man folgendes

Code:
action easy_wheel2()
{	
	ENTITY* shape2 = ent_create("add_shape2.mdl",me.x,NULL);
	set(shape2, INVISIBLE);
	
	c_setminmax(me);
	
	pXent_settype(me,PH_RIGID,PH_SPHERE);
	
	var i;
	for (i=10; i<360; i+=72) {
		shape2.pan = i;
		pXent_addshape(me, shape2, PH_BOX);
	}

	pXent_removeshape(my, 0);
	//
	
	var Motion[6] = { 0,0,0,0,0,NX_D6JOINT_MOTION_FREE};

	pXcon_add(PH_6DJOINT,me,NULL,0);

	pXcon_set6djoint(me,Motion,NULL);
}




das 2te. shape muss um 90 grad gederht werden...

und das ergebniss mit dem code fürs 3te zahnrad:


laugh

Re: drehendes zahnrad ? [Re: ratz] #421025
04/08/13 17:12
04/08/13 17:12
Joined: Oct 2008
Posts: 341
R
ratz Offline OP
Senior Member
ratz  Offline OP
Senior Member
R

Joined: Oct 2008
Posts: 341

Last edited by ratz; 04/08/13 19:18.
Re: drehendes zahnrad ? [Re: ratz] #421034
04/08/13 20:28
04/08/13 20:28
Joined: Oct 2008
Posts: 341
R
ratz Offline OP
Senior Member
ratz  Offline OP
Senior Member
R

Joined: Oct 2008
Posts: 341
hier mein letzter Post zum Thema: wink

Video
http://www.youtube.com/watch?v=85P0KD-lsjk

Bild

Page 4 of 5 1 2 3 4 5

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1