Newton users: Tech Demo question

Posted By: DoctorFong

Newton users: Tech Demo question - 02/13/04 15:32

I posted this on the Newton forum but have had no luck. It's not a complicated problem, but I'm a total noob and stuck:

My question has to do with the vehicle in the tech demo (the driveable crane): Namely, with what action does one control its movement? I created a similar vehicle base (just a simple rectangular body with four wheels). It works fine, as in it will move around on the floor if I shoot it, but I’m in the dark as to how to assign an “action” to it, since the action of all the components is “NewtonWoodEntity”.

I did receive this reply:

--------------
"You can make your own entity actions, just use the code from NewtonWoodEntity and create whatever action name youd like, maybe NewtonWheeledEntity in this case. In addition, you can assign parameters specific to your 'vehicle' in this new entity action."
--------------

OK, not too specific, but at least a start. This is what I did. I created the following action:

ACTION player_NewtonDrive
{
NewtonCreateGravityEntity (wood_material);
MY._MOVEMODE = _MODE_DRIVING;
MY._FORCE = 1.5;
MY._BANKING = 0.5;
MY.__SLOPES = ON;
MY.__TRIGGER = ON;
player_move();
}

I put it in the NewtonScript2.wdl after the "NewtonTerrain" action. I gave the chassis of the vehicle the "player_NewtonDrive" action.

The result: The chassis will drive around like in the "player_drive" action, and it will collide with other NewtonWoodEntities...BUT the hinges for the wheels do not stay attached. The chassis simply drops to the floor between the wheels the moment the level starts.

The hinges will stay attached if the chassis has behavior like "ndef" or "NewtonWoodEntity" but if any "player_" action is assigned to it the hinges won't stay attached.


I am obviously doing something wrong. Any ideas?


Posted By: Newton

Re: Newton users: Tech Demo question - 02/13/04 21:11

Few people has had similar problems moving vehicles. The sucject is some what complicated and too long to explain in the forum. It is better to have some working script and move from there. I have not answered because you need a feature the was not esposed in plug-in 1.2, any atent to do it with 1.2 will result in a mediocre implementation.

This weekend we will release a patch 1.5 with vehicles action (partcial implementation), bouyancy and other especial effects.
There are pleanty of demos (most of then by Ventilators) that show how to do what you need.

Sorry for the delay
Newton
Posted By: DoctorFong

Re: Newton users: Tech Demo question - 02/14/04 03:52

The patch is coming out this weekend? Terrific. Thanks.
© 2024 lite-C Forums