Scolring - Forum

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.

#1 24-Sep-2024 22:02:44

samiux
Member
Registered: 4-May-2018
Posts: 318

Set Driving Wheels And Set Directional Wheel For PhysicVehicle Plugit

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

#2 25-Sep-2024 09:15:40

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: Set Driving Wheels And Set Directional Wheel For PhysicVehicle Plugit

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

#3 25-Sep-2024 18:10:42

samiux
Member
Registered: 4-May-2018
Posts: 318

Re: Set Driving Wheels And Set Directional Wheel For PhysicVehicle Plugit

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

#4 26-Sep-2024 01:13:34

samiux
Member
Registered: 4-May-2018
Posts: 318

Re: Set Driving Wheels And Set Directional Wheel For PhysicVehicle Plugit

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

Board footer

Powered by FluxBB