Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Hi I am coding in Scol the functions for ''Set Driving'' and ''Set Directional'' to disable or enable the vehicle's drive wheels in the physics vehicle plugin. However I don't really know how to configure it for each wheel.
Here my code
fun cbDriving(inst, from, action, param, reply, obstr)=
let if (atoi param) == nil then 0 else (atoi param) -> state in
set obstr.PVEHICLE_bDriving = state;
0;;
fun cbDirectional(inst, from, action, param, reply, obstr)=
let if (atoi param) == nil then 0 else (atoi param) -> state in
set obstr.PVEHICLE_bDirectional = state;
0;;
Offline
Hello,
well it's not really simple since the tires are defined on the vehicle creation of the physics engine. Once the vehicle is defined you can't remove a wheel.
The only thing you can do is to destroy and recreate all the vehicle.
https://redmine.openspace3d.com/project … 3phys.html
What is the purpose of your need ?
Offline
I just want an option to be able to enable or disable each of the driving wheels and directional wheels.
For example, I would like to disable or enable the 4-wheel drive to create an all-wheel drive/4X4 mode. For example, disable the 2 rear drive wheels only to keep traction (if we have defined the 2 front drive wheels) and reactivate it to have an all-wheel drive/4X4 mode. Even to disable the 2 front drive wheels and only to keep propulsion (if we have defined the 2 rear drive wheels) and vice versa for the directional wheels.
Last edited by samiux (26-Sep-2024 01:14:43)
Offline
Oh well that's too bad the wheels are linked to the physics engine.
It might be time to consider another physics engine for the next versions.
Offline