|
6 registered members (TipmyPip, AndrewAMD, JMMAC, Martin_HH, Grant, 1 invisible),
5,476
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: drehendes zahnrad ?
[Re: Ch40zzC0d3r]
#420370
03/24/13 14:56
03/24/13 14:56
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
ratz@ you need to register object as a PH_RIGID, then make it sleep via pXent_setsleep. And then, add a hinge that you need to it (please read the manual for hinge information). And at the end, if you'll need to rotate it, add angular forces via pXent_setangvelocity!
Edit: don't try to use PH_POLY for PH_RIGID, it will work only with static geometry! Use CONVEX instead!
Last edited by 3run; 03/24/13 15:03.
|
|
|
Re: drehendes zahnrad ?
[Re: 3run]
#420373
03/24/13 16:03
03/24/13 16:03
|
Joined: Oct 2008
Posts: 341
ratz
OP
Senior Member
|
OP
Senior Member
Joined: Oct 2008
Posts: 341
|
-.- okey, ich hab jetzt alles versucht, aber irgendwie klappt das alles nicht die räder flippen rum ich weis nicht wann ich: physX_setsleep(me,1) und wann 0 benutzen soll was hat das "Hinge" damit zutuhn ? (no manuel) warum soll ich denn jetzt pXent_setangvelocity statt pXent_rotate benutzen ? braucht das easy_wheel auch eine setseep function ? braucht das easy_wheel auch eine kinimatic ? hier mein ganzer code
///////////////////////////////
#include <acknex.h>
#include <default.c>
#include <ackphysX.h>
///////////////////////////////
function main()
{
physX_open();
level_load("room.WMB");
}
action easy_wheel()
{
c_setminmax(me);
//pXent_setbodyflag(me,NX_BF_KINEMATIC,1);
pXent_settype(me,PH_RIGID,PH_CONVEX);
//pXcon_add ( PH_HINGE, chain2, chain1, 0 );
//pXent_setsleep(me,1);
//pXent_setsleep(me,0);
}
action force_wheel()
{
c_setminmax(me);
pXent_setbodyflag(me,NX_BF_KINEMATIC,1);
pXent_settype(me, PH_RIGID,PH_CONVEX);
//pXent_setsleep(me,0);
//pXent_setsleep(me,0);
ANGLE angle_me;
while(1)
{
if (key_space == 1)
{
angle_me.pan += 2* time_step;
pXent_rotate(me, nullvector, angle_me);
//pXent_setangvelocity(me, angle_me);
//pXent_setangvelocity(me, vector(0,0,1));
}
wait(1);
}
}
kann mir mal jemand helfen ? 
|
|
|
Re: drehendes zahnrad ?
[Re: ratz]
#420376
03/24/13 17:34
03/24/13 17:34
|
Joined: Apr 2005
Posts: 4,506 Germany
fogman
Expert
|
Expert
Joined: Apr 2005
Posts: 4,506
Germany
|
Kannst Du die Zahnräder hochladen? Dann könnten wir es mal selbst testen.
no science involved
|
|
|
Re: drehendes zahnrad ?
[Re: fogman]
#420383
03/24/13 21:46
03/24/13 21:46
|
Joined: Oct 2008
Posts: 341
ratz
OP
Senior Member
|
OP
Senior Member
Joined: Oct 2008
Posts: 341
|
wheel.mdles ist nur ein zylinder mit 20 Edges wo ich mit Extrude jeden 2ten rausgemacht habe
Last edited by ratz; 03/24/13 21:48.
|
|
|
Re: drehendes zahnrad ?
[Re: ratz]
#420384
03/24/13 22:07
03/24/13 22:07
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
Das wird nicht (EDIT: ohne weiteres) funktionieren, da Zahnräder nicht konvex sind.
Last edited by Superku; 03/24/13 22:08.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: drehendes zahnrad ?
[Re: ratz]
#420388
03/24/13 22:59
03/24/13 22:59
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
I wonder what you are guys talking about.. but maybe this might help: The mesh for a PH_CONVEX hull can be concave - the hull is then automatically converted to convexity by filling gaps and dips in the mesh.
|
|
|
|