Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Nymphodora), 972 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 8 of 16 1 2 6 7 8 9 10 15 16
Re: newton [Re: VeT] #113111
11/01/07 20:15
11/01/07 20:15
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
what is the better way to clamp two objects, so they couldnt move?
may i use joints, compound collision, or just simple positions?

for example, i need to mount car carcass from two parts: down, that is more heavier, and top, wich is lighter

or the better way is to make one entity and use NewtonBodySetMassMatrix?


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: newton [Re: VeT] #113112
11/01/07 20:50
11/01/07 20:50
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
if you are only interested in the center of mass then you can just offset the center of mass. if you would also like to have more accurate (concave) collision geometry for your car then you can use a compound collision object.

Re: newton [Re: ventilator] #113113
11/03/07 21:43
11/03/07 21:43
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
okay... i get

MH.keyX = (key_pressed(17) - key_pressed(31));
MH.keyY = (key_pressed(30) - key_pressed(32));
if (MH.keyX!=0 && MH.keyY!=0) { MH.keyX*=.5; MH.keyY*=.5;}

and

vec_set(temp_vec,vector(MH.keyX*100, MH.keyY*100,-mass*5));
vec_rotate(temp_vec,MH.model.pan);
NewtonBodySetForce(MH.NewtonChar,vectorf(temp_vec.x,temp_vec.y,temp_vec.z));

// damping
NewtonBodySetLinearDamping (MH.NewtonChar, 0.9);

// rotating
NewtonBodySetOmega(MH.NewtonChar, vectorf(0,0,-MH.mouseX*5));


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: newton [Re: ventilator] #113114
11/03/07 21:44
11/03/07 21:44
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
okay... i get

MH.keyX = (key_pressed(17) - key_pressed(31));
MH.keyY = (key_pressed(30) - key_pressed(32));
if (MH.keyX!=0 && MH.keyY!=0) { MH.keyX*=.5; MH.keyY*=.5;}

and

vec_set(temp_vec,vector(MH.keyX*100, MH.keyY*100,-mass*5));
vec_rotate(temp_vec,MH.model.pan);
NewtonBodySetForce(MH.NewtonChar,vectorf(temp_vec.x,temp_vec.y,temp_vec.z));

// damping
NewtonBodySetLinearDamping (MH.NewtonChar, 0.9);

// rotating
NewtonBodySetOmega(MH.NewtonChar, vectorf(0,0,-MH.mouseX*5));



when i'm pressing W, body is going strait ahead... when i'm pressing W and A, body moves ahead-left... when i'm pressing A, body still move somwhere ahead, not left

what it could be?


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: newton [Re: VeT] #113115
11/04/07 01:46
11/04/07 01:46
Joined: Oct 2006
Posts: 36
BigM Offline
Newbie
BigM  Offline
Newbie

Joined: Oct 2006
Posts: 36
Hi all,

some small issues:

1- with A7.05 I know the coordinate set 3 in the D3DVERTEX struct should have 4 coordinates. However, adding the 4th coordinate completely messes up the treecollision generation. Without the 4th coordinate, all is well (I can even use the 'old' newton.c script by modifying only 'VERTEX' to '_VERTEX_'). Any clues on why this occurs?

2- I tried using the double precision newton.dll but it failed with a 'crash in main' error, even though I typedefined dFloat as double in the newton header. Should other float variables in the script be changed to double as well? Despite the crash, defining dFloat as a double did have an effect: some entities loaded only after newton_start() became visible, whereas a crash would occur earlier if dFloat was typedefined as a float.

Thanks ventilator for your effort on this!

Re: newton [Re: BigM] #113116
11/04/07 03:42
11/04/07 03:42
Joined: Oct 2006
Posts: 36
BigM Offline
Newbie
BigM  Offline
Newbie

Joined: Oct 2006
Posts: 36
Hi again ventilator,

Another small question: I'd like to implement a sphere with rolling friction, using a DryRollingFriction joint, which is a custom joint that 'ships' with the Newton SDK. Is there a straightforward way to import it to GS? I tried, unsuccessfully, to include "CustomDryRollingFriction.cpp" but ran into many more include dependencies and gave up.

I though you'd be the right person to ask this since you made that great pool game with rolling friction.

Thanks

Re: newton [Re: BigM] #113117
11/04/07 16:16
11/04/07 16:16
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
1. the vertex struct changed with 7.05.1. are you sure your engine version isn't older? i don't have any other explanation.

2. i haven't tried the double precision dll with lite-c myself yet. i would have to experiment with this. but since the double precision dll works with other compilers it must be some issue on the lite-c side. i think lite-c automatically casts floats to double when needed but i am not sure. you could try to directly use doubles for everything.

3. my pool game uses the old gamestudio plugin and there julio jerez added the dryrollingfriction for me. for lite-c you have to adapt the custom joint example.

@vet: i am not sure what you want to achieve.

Re: newton [Re: ventilator] #113118
11/04/07 17:20
11/04/07 17:20
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
i mean, does somebody tried to move character in way, like my

for example, maybe i need to set forces at 0 every frame, or change damping...


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: newton [Re: VeT] #113119
11/04/07 17:25
11/04/07 17:25
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
i don't have that much experience with moving characters around with a physics engine since my projects most of the time don't contain any characters. but i would look on the newton forum. i think there are many threads about doing character movement or you could start a new one.

Re: newton [Re: ventilator] #113120
11/04/07 17:44
11/04/07 17:44
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
here's very simple one... but i dont understand, why body dont moves to left...


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Page 8 of 16 1 2 6 7 8 9 10 15 16

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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