[Newton] car physics

Posted By: dragon100

[Newton] car physics - 06/16/05 20:02

started playing around with the newton car physics script,
however unfortunely i have very quickly encountered a problem.
When i assign the vehicle behaviour to a vehicle it falls down and through the
level floor.

Does anyone know what i'm missing

thanks

dragon
Posted By: ello

Re: [Newton] car physics - 06/17/05 07:54

myabe you step over to the newton forum
Posted By: Daedelus

Re: [Newton] car physics - 06/17/05 09:01

Its falling through the floor because for whatever reason, your .cls file either isn't being detected or wasn't built with the level.

Did you add this before your main function?

string level_str = <your_levelname.WMB>; // Intro level

ifdef USE_NEWTON_GAME_DYNAMICS;
string newtonLevel_cls = <your_levelname.CLS>;
endif;

Also, is this in your main function?
// now load the level
level_load(level_str);

// initialize newton physics
ifdef USE_NEWTON_GAME_DYNAMICS;
wait(1);
dll_handle = newtonHandle;
NewtonAddMap (level_str);
endif;

If you haven't already, try adding those lines and rebuilding the level.
Hope that helps.
Posted By: dragon100

Re: [Newton] car physics - 06/18/05 10:05

thanks

but unfortunately it still happens the car just falls through the level geometry. Quite wierd. Any other suggestions anyone may have would be very welcome.

dragon
Posted By: fogman

Re: [Newton] car physics - 06/18/05 14:19

Try to scale the model a bit (in WED or MED). Then build again, IŽve these problems
sometimes, too.

Make also sure that BEFORE level_load (xxx.wmb)

wait(3);

is inserted.

[edit] hehe, your avatar is a funny one [edit]
Posted By: dragon100

Re: [Newton] car physics - 06/20/05 16:57

nope, still doesnt work. However if i modify the NGD_Tutorial it does. Dont understand why the code looks exactly the same...i think
Posted By: fogman

Re: [Newton] car physics - 06/20/05 17:20

Maybe you should post your levelchange code if you want. Then IŽll
play a little with it and maybe we find a way to
get it to work.
Posted By: dragon100

Re: [Newton] car physics - 06/27/05 17:22

actually, there isnt any level change its just the first level. The code is very simple so i must be missing something very obvious. This is the code i am using:

////////////////////////////////////////////////////////////////////////
// A6 main wdl:
// Created by WED.
////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where template files can be found.
path "C:\\Program Files\\GStudio6\\template_6"; // Path to A6 templates directory
path "C:\\Program Files\\GStudio6\\template_6\\code"; // Path to A6 template code subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\images"; // Path to A6 template image subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\sounds"; // Path to A6 template sound subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\models"; // Path to A6 template model subdirectory

////////////////////////////////////////////////////////////////////////////
// Included files
//include <gid01.wdl>; // global ids
//include <display00.wdl>; // basic display settings
include <newton.wdl>;
include <newtonScript2.wdl>;
include <newtonVehicle.wdl>;
/////////////////////////////////////////////////////////////////

var video_mode = 6; // screen size 640x480
var video_depth = 16; // 16 bit colour D3D mode
var video_screen=1;

/////////////////////////////////////////////////////////////////
// Filename of the starting level.
string level_str = <car.WMB>; // give file names in angular brackets

ifdef USE_NEWTON_GAME_DYNAMICS;
string newtonLevel_cls = <car.CLS>;
endif;

///////////////////////////////////////////////////////////////////

bmap splashmap = <logolite.pcx>; // the default logo in templates
panel splashscreen {
bmap = splashmap;
flags = refresh,d3d;
}
// The following script controls the sky
sky horizon_sky {
// A backdrop texture's horizontal size must be a power of 2;
// the vertical size does not matter
type = <horizon.pcx>;
tilt = -10;
flags = scene,overlay,visible;
layer = 3;
}

// Desc: The main() function is started at game start
function main()
{
tex_share = on; // map entities share their textures

// center the splash screen for non-640x480 resolutions, and display it
splashscreen.pos_x = (screen_size.x - bmap_width(splashmap))/2;
splashscreen.pos_y = (screen_size.y - bmap_height(splashmap))/2;
splashscreen.visible = on;
// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);
// set some common flags and variables
// freeze all entity functions
level_load(level_str);

ifndef USE_NEWTON_GAME_DYNAMICS;
wait(1);
dll_handle = newtonHandle;
NewtonAddMap (level_str, splashscreen);
endif;

freeze_mode = 1;
sleep(1);
splashscreen.visible = off;
bmap_purge(splashmap); // remove splashscreen from video memory


freeze_mode = 0;
}

If you can spot something please let me know because i'm at a loss.

thanks


dragon
Posted By: kelly_b_c

Re: [Newton] car physics - 06/28/05 01:11

Be sure to re-save the level right after building. That usually seems to do the trick for me.
Posted By: Why_Do_I_Die

Re: [Newton] car physics - 07/13/05 07:21

ello , since you are obviously not the owner of this boards , or a moderator , I dont think you have any type of authority to be telling anyone to go elsewhere for help reguarding the Newton physics plugin, I'm pretty sure if gamestudio wouldnt have implemented physics (from a free and open source physics engine , which they decided only the people who pay $800 for the engine should be allowed to use) you would be begging for a Newton forum.Newton Game Dynamics for GameStudio { A VERY GOOD physics plugin for GameStudio developed by the Newton Game Dynamics staff using their physics engine for FREE (NOT $800 , FOR FREE) } is a gift to the GameStudio community and it should be appreciated. I still dont understand why the Pro users feel this forum belongs to them in any way (Fastlane for example , who harrasses Newton users). I think people who harrass the newton users asking for help should be warned and reprehended if behaviour continues. ( asking you to go look for help elsewhere IS in a way harrassement , it references to the person and or their questions not being welcomed here , which shouldnt be the case).
Posted By: FoxZero

Re: [Newton] car physics - 07/15/05 19:47

Very well said Why_Do_I_Die! Words good enough to quote!
Posted By: fogman

Re: [Newton] car physics - 07/21/05 18:18

1. This thread is really old.

2. Ello wrotes "maybe you step...", so it was just a suggestion.

greets, fogman
Posted By: FoxZero

Re: [Newton] car physics - 07/21/05 19:08

I was just being funny. But everyone knows the Newton forum is forsaken. I know people who post there but they never get answers. I've got nothing against Ello and Why_DO_I_DIE was almost banned for attacking Newton haters. He's just standin up for the the Newton users and I respect that.
Posted By: fastlane69

Re: [Newton] car physics - 07/21/05 19:19

Quote:

Fastlane for example , who harrasses Newton users).




Really????? Huh....

You care to back that statement up or is it just easier to believe the Urban Legends and pick on mean ol' pretentious Fastlane who eats kids, destroys families, hates all non-Pro users, and stalks newton users relentlessly??

My wanting to keep the 3DGS Physics forums exclusive for, GASP!!! , 3DGS Physics Users is far from harrassing, Newbie

Quote:

I think people who harrass the newton users asking for help should be warned and reprehended if behaviour continues. ( asking you to go look for help elsewhere IS in a way harrassement , it references to the person and or their questions not being welcomed here , which shouldnt be the case).





And I think Newton posts belong on the Newton forum....we don't always get what we want, do we?

This is the most assenine definition of "harrassment" I have ever heard, Newbie.
I do not welcome Newton questions and am vocal about it; It detracts from new and old users using the 3DGS physics solution and fills the 3DGS Physics Forum with NON-3DGS content. It sickens me to see that OVER 50% (YES 50%) of Physics Forums posts are [newton] post which have ZERO relevance to the 3DGS Physics system and has ZERO use for 3DGS Physics users (both Pro AND Comm).

But a person must have a pretty sheltered exsistence to mistake this attitude for "harrassment"; get real.


(PS: if you want to talk harrassment, hows digging up an old thread and ranting about how one user is harrassing others...that's pretty harrassing to me and if memory serves, actually got a forum memeber banned recently for doing the exact same thing.)
Posted By: Doug

Re: [Newton] car physics - 07/22/05 00:33

Why do people love drama?

Just relax everyone. Most of the misunderstanding here comes from digging up old posts. Yes, in the past we only allowed A6 physics questions in this forum, now we allow Newton questions is they are labeled [Newton].

If you want drama, start up your own LiveJournal account. We don't need any here.
© 2024 lite-C Forums