130 float wspeed = wind.length();
134 float v = axis.getRotationTo(wind).w;
136 if (v < 1.0 && v > -1.0)
142 float sea_level_pressure = 101325;
143 float airpressure = sea_level_pressure *
approx_pow(1.0 - 0.0065 * altitude / 288.1, 5.24947);
144 float airdensity = airpressure * 0.0000120896f;
172 for (
size_t i = 0; i <
m_buoyance->buoy_cached_nodes.size(); ++i)
178 m_buoyance->buoy_cached_nodes[i].Forces = Ogre::Vector3::ZERO;
183 m_buoyance->buoy_projected_nodes[i].Forces = Ogre::Vector3::ZERO;
218 for (
size_t i = 0; i <
m_buoyance->buoy_cached_nodes.size(); ++i)
221 const Ogre::Vector3& force_a =
m_buoyance->buoy_cached_nodes[i].Forces;
222 const Ogre::Vector3& force_b =
m_buoyance->buoy_projected_nodes[i].Forces;
223 Ogre::Vector3 interp_force = force_a * (1.0f - interp_ratio) + force_b * interp_ratio;
252 for (
int i = 0; i < num_axle_diffs; i++)
258 if (axle_1_wheels[0]->wh_is_detached && axle_1_wheels[1]->wh_is_detached)
263 if (axle_2_wheels[0]->wh_is_detached && axle_2_wheels[1]->wh_is_detached)
272 if (axle_wheels[0]->wh_is_detached) axle_wheels[0]->
wh_speed = axle_wheels[1]->
wh_speed;
273 if (axle_wheels[1]->wh_is_detached) axle_wheels[1]->
wh_speed = axle_wheels[0]->
wh_speed;
278 for (
int i = 0; i < num_axle_diffs; i++)
283 Ogre::Real axle_torques[2] = {0.0f, 0.0f};
291 {axle_torques[0], axle_torques[1]},
311 Ogre::Real axle_torques[2] = {0.0f, 0.0f};
318 {axle_torques[0], axle_torques[1]},
371 float curspeed = fabs(relspeed);
372 float wheel_slip = fabs(
ar_wheels[i].wh_speed - relspeed) / std::max(1.0f, curspeed);
382 float tc_coef = pow(
ar_wheels[i].wh_tc_coef, std::min(std::abs(
ar_wheels[i].wh_speed) / 5.0f, 1.0f));
412 if (abrake != 0.0 || dbrake != 0.0 || hbrake != 0.0)
414 float adbrake = abrake + dbrake;
451 Real contact_counter = 0.0f;
452 Vector3 slip = Vector3::ZERO;
453 Vector3 force = Vector3::ZERO;
460 float inverted_rlen = 1.0f / radius.length();
467 Vector3 dir = axis.crossProduct(radius) * inverted_rlen;
471 if (
ar_wheels[i].wh_nodes[j]->nd_has_ground_contact ||
ar_wheels[i].wh_nodes[j]->nd_has_mesh_contact)
473 contact_counter += 1.0f;
479 if (contact_counter > 0.0f && !force.isZeroLength())
481 slip /= force.length();
482 slip /= contact_counter;
483 force /= contact_counter;
484 Vector3 normal = force.normalisedCopy();
486 Vector3 vel = v - v.dotProduct(normal) * normal;
509 Vector3 radius = Plane(axis,
ar_wheels[i].wh_near_attach_node->RelPosition).projectVector(rradius);
510 float offset = (rradius - radius).length();
511 Real rlen = radius.normalise();
513 if (rlen > 0.01 && offset * 2.0f < rlen && fabs(
ar_wheels[i].wh_torque) > 0.01f)
515 Vector3 cforce = axis.crossProduct(radius);
582 float roll = asin(
GetCameraRoll().dotProduct(Vector3::UNIT_Y));
584 if (fabs(roll) > 0.2)
627 float rate = std::exp(-std::min(std::abs(diff), 1.0f) / sensitivity) * diff;
636 float rate = std::max(1.2f, 30.0f / (10.0f));
645 float rate = std::max(1.2f, 30.0f / (10.0f + std::abs(
ar_wheel_speed / 2.0f)));
717 const int num_hydros =
static_cast<int>(
ar_hydros.size());
718 for (
int i = 0; i < num_hydros; ++i)
784 cstate /= (float)div;
791 float factor = 1.0 - cstate * hydrobeam.
hb_speed;
796 if (factor < 1.0f -
ar_beams[beam_idx].shortbound)
798 if (factor > 1.0f +
ar_beams[beam_idx].longbound)
812 bool requested =
false;
822 float crankfactor = 1.0f;
851 else if (
ar_command_key[i].commandValue < 0.01f && oldValue > 0.01f)
873 bool requestpower =
false;
885 crankfactor = std::min(crankfactor, 1.0f);
902 cmd_beam.
cmb_state->auto_moving_mode = 0;
906 int mode = cmd_beam.
cmb_state->auto_moving_mode;
910 cmd_beam.
cmb_state->auto_moving_mode = -1;
912 cmd_beam.
cmb_state->auto_moving_mode = 1;
915 if (mode != 0 && mode != cmd_beam.
cmb_state->auto_moving_mode)
918 cmd_beam.
cmb_state->auto_moving_mode = 0;
935 cmd_beam.
cmb_state->pressed_center_mode =
true;
936 cmd_beam.
cmb_state->auto_moving_mode = 0;
940 cmd_beam.
cmb_state->pressed_center_mode =
false;
945 bool key = (v > 0.5);
946 if (bbeam_dir * cmd_beam.
cmb_state->auto_moving_mode <= 0 && key)
948 cmd_beam.
cmb_state->auto_moving_mode = bbeam_dir * 1;
950 else if (cmd_beam.
cmb_state->auto_moving_mode == bbeam_dir * 1 && !key)
952 cmd_beam.
cmb_state->auto_moving_mode = bbeam_dir * 2;
954 else if (cmd_beam.
cmb_state->auto_moving_mode == bbeam_dir * 2 && key)
956 cmd_beam.
cmb_state->auto_moving_mode = bbeam_dir * 3;
958 else if (cmd_beam.
cmb_state->auto_moving_mode == bbeam_dir * 3 && !key)
960 cmd_beam.
cmb_state->auto_moving_mode = 0;
966 if (bbeam_dir * cmd_beam.
cmb_state->auto_moving_mode > 0)
1019 cmd_beam.
cmb_state->auto_moving_mode = 0;
1034 if (v > 0.0f &&
ar_rotators[rota].engine_coupling > 0.0f)
1035 requestpower =
true;
1047 if (doUpdate || v != 0.0f)
1068 float pump_rpm = 660.0f * (1.0f - (work / (float)active) / 100.0f);
1083 Vector3 axis = ax1 - ax2;
1086 Plane pl = Plane(axis, 0);
1089 for (
int k = 0; k < 2; k++)
1094 float ref1len = ref1.normalise();
1095 float ref2len = ref2.normalise();
1097 Vector3 th1 = Quaternion(Radian(
ar_rotators[i].angle + Math::HALF_PI), axis) * ref1;
1099 float aerror = asin(th1.dotProduct(ref2));
1103 Vector3 dir1 = ref1.crossProduct(axis);
1104 Vector3 dir2 = ref2.crossProduct(axis);
1125 for (std::vector<tie_t>::iterator it =
ar_ties.begin(); it !=
ar_ties.end(); it++)
1132 if (it->ti_beam->refL == 0 || it->ti_beam->L == 0)
1135 float clen = it->ti_beam->L / it->ti_beam->refL;
1136 if (clen > it->ti_min_length)
1138 it->ti_beam->L *= (1.0 - it->ti_contract_speed *
PHYSICS_DT / it->ti_beam->L);
1143 it->ti_tying =
false;
1147 if (fabs(it->ti_beam->stress) > it->ti_max_stress)
1149 it->ti_tying =
false;
1197 msg <<
" (index: " << node->
pos <<
")";
1203 msg <<
"It was between nodes ";
1219 Real dislen = dis.squaredLength();
1222 dislen *= inverted_dislen;
1225 Real difftoBeamL = dislen -
ar_beams[i].
L;
1235 float interp_ratio = 0.0f;
1243 if (interp_ratio != 0.0f)
1256 k += (tspring - k) * interp_ratio;
1257 d += (tdamp - d) * interp_ratio;
1274 if (difftoBeamL > 0.0f)
1286 if (difftoBeamL >
ar_beams[i].L * break_limit)
1293 msg <<
"[RoR|Diag] XXX Support-Beam " << i <<
" limit extended and broke. "
1294 <<
"Length: " << difftoBeamL <<
" / max. Length: " << (
ar_beams[i].
L*break_limit) <<
". ";
1303 if (difftoBeamL < 0.0f)
1317 float slen = -k * difftoBeamL - d * v;
1321 float len = std::abs(slen);
1322 if (len >
ar_beams[i].minmaxposnegstress)
1327 if (slen >
ar_beams[i].maxposstress && difftoBeamL < 0.0f)
1348 msg <<
"[RoR|Diag] YYY Beam " << i <<
" just deformed with extension force "
1354 else if (slen <
ar_beams[i].maxnegstress && difftoBeamL > 0.0f)
1362 if (Lold > 0.0f &&
ar_beams[i].L > Lold)
1372 msg <<
"[RoR|Diag] YYY Beam " << i <<
" just deformed with extension force "
1400 msg <<
"[RoR|Diag] XXX Beam " << i <<
" just broke with force " << len <<
" / " <<
ar_beams[i].
strength <<
". ";
1407 if (
ar_beams[i].detacher_group > 0)
1462 f *= (slen * inverted_dislen);
1471 for (
int i = 0; i < static_cast<int>(
ar_inter_beams.size()); i++)
1478 Real dislen = dis.squaredLength();
1481 dislen *= inverted_dislen;
1498 float slen = -k * (difftoBeamL) - d * v.dotProduct(dis) * inverted_dislen;
1502 float len = std::abs(slen);
1508 if (slen >
ar_inter_beams[i]->maxposstress && difftoBeamL < 0.0f)
1511 Real deform = difftoBeamL + yield_length * (1.0f -
ar_inter_beams[i]->plastic_coef);
1529 msg <<
"[RoR|Diag] YYY Beam " << i <<
" just deformed with extension force "
1535 else if (slen <
ar_inter_beams[i]->maxnegstress && difftoBeamL > 0.0f)
1538 Real deform = difftoBeamL + yield_length * (1.0f -
ar_inter_beams[i]->plastic_coef);
1553 msg <<
"[RoR|Diag] YYY Beam " << i <<
" just deformed with extension force "
1581 msg <<
"Beam " << i <<
" just broke with force " << len <<
" / " <<
ar_inter_beams[i]->strength <<
". ";
1595 f *= (slen * inverted_dislen);
1611 if (!
ar_nodes[i].nd_no_ground_contact)
1670 Real maxtur = defdragxspeed * approx_speed * 0.005f;
1677 const bool is_under_water = water->IsUnderWater(
ar_nodes[i].AbsPosition);
1723 bool has_collision =
false;
1724 bool do_callback_enter =
true;
1725 bool do_callback_exit =
false;
1729 if (itor->first == cbox)
1738 do_callback_enter =
false;
1739 do_callback_exit =
true;
1757 do_callback_exit =
false;
1761 if (do_callback_enter)
1778 if (do_callback_exit)
1790 for (std::vector<hook_t>::iterator it =
ar_hooks.begin(); it !=
ar_hooks.end(); it++)
1793 it->hk_timer = std::max(0.0f, it->hk_timer -
PHYSICS_DT);
1795 if (it->hk_lock_node && it->hk_locked ==
PRELOCK)
1797 if (it->hk_beam->L < it->hk_min_length)
1805 if (it->hk_beam->L > it->hk_lockspeed && fabs(it->hk_beam->stress) < it->hk_maxforce)
1807 it->hk_beam->L = (it->hk_beam->L - it->hk_lockspeed);
1811 if (fabs(it->hk_beam->stress) < it->hk_maxforce)
1813 it->hk_beam->L = 0.001f;
1819 if (it->hk_nodisable)
1843 if (r.rp_locked ==
LOCKED && r.rp_locked_ropable)
1845 auto locked_node = r.rp_locked_ropable->node;
1846 r.rp_beam->p2->AbsPosition = locked_node->AbsPosition;
1847 r.rp_beam->p2->RelPosition = locked_node->AbsPosition -
ar_origin;
1848 r.rp_beam->p2->Velocity = locked_node->Velocity;
1849 locked_node->Forces += r.rp_beam->p2->Forces;
1850 r.rp_beam->p2->Forces = Vector3::ZERO;
void LogNodeId(RoR::Str< L > &msg, node_t *node)
void LogBeamNodes(RoR::Str< L > &msg, beam_t &beam)
const int BUOYANCY_VISUAL_UPDATE_INTERVAL
const int BUOYANCY_SAMPLING_INTERVAL
bool TestNodeEventBoxCollision(const node_t &node, collision_box_t *cbox)
Central state/object manager and communications hub.
float fast_invSqrt(const float v)
float approx_sqrt(const float y)
float approx_pow(const float x, const float y)
Game state manager and message-queue provider.
static const int MAX_COMMANDS
maximum number of commands per actor
static const float RAD_PER_SEC_TO_RPM
Convert radian/second to RPM (60/2*PI)
#define SOUND_START(_ACTOR_, _TRIG_)
#define SOUND_STOP(_ACTOR_, _TRIG_)
#define SOUND_PLAY_ONCE(_ACTOR_, _TRIG_)
#define SOUND_MODULATE(_ACTOR_, _MOD_, _VALUE_)
bool ar_hydro_speed_coupling
bool alb_mode
Anti-lock brake state; Enabled? {1/0}.
float m_odometer_user
GUI state.
void updateSlideNodeForces(const Ogre::Real delta_time_sec)
calculate and apply Corrective forces
bool m_antilockbrake
GUI state.
TransferCase * m_transfer_case
Physics.
void CalcCommands(bool doUpdate)
float ar_hydro_elevator_state
bool m_ongoing_reset
Hack to prevent position/rotation creep during interactive truck reset (aka LiveRepair).
void CalcBeams(bool trigger_hooks)
float m_mouse_grab_move_force
float ar_wheel_speed
Physics state; wheel speed in m/s.
int GetNumActiveConnectedBeams(int nodeid)
Returns the number of active (non bounded) beams connected to a node.
BuoyCachedNodeID_t ar_cabs_buoy_cache_ids[MAX_CABS]
CmdKeyArray ar_command_key
BEWARE: commandkeys are indexed 1-MAX_COMMANDS!
wheel_t ar_wheels[MAX_WHEELS]
std::vector< rope_t > ar_ropes
NodeNum_t m_mouse_grab_node
Sim state; node currently being dragged by user.
float m_odometer_total
GUI state.
std::vector< wheeldetacher_t > ar_wheeldetachers
int ar_buoycabs[MAX_CABS]
int m_num_wheel_diffs
Physics attr.
int m_num_proped_wheels
Physics attr, filled at spawn - Number of propelled wheels.
void CalcForceFeedback(bool doUpdate)
std::vector< tie_t > ar_ties
float ar_hydro_rudder_state
void CalcBuoyance(bool doUpdate)
int m_num_axle_diffs
Physics attr.
float m_stabilizer_shock_ratio
Physics state.
CineCameraID_t ar_current_cinecam
Sim state; index of current CineCam (CINECAMERAID_INVALID if using 3rd-person camera)
void CalcShocks(bool doUpdate, int num_steps)
float tc_wheelslip_constant
use ACTORSIMATTR_TC_WHEELSLIP_CONSTANT
Differential * m_axle_diffs[1+MAX_WHEELS/2]
Physics.
ScrewpropPtr ar_screwprops[MAX_SCREWPROPS]
Replay * m_replay_handler
NodeNum_t ar_main_camera_node_pos
Sim attr; ar_camera_node_pos[0] >= 0 ? ar_camera_node_pos[0] : 0.
std::vector< Airbrake * > ar_airbrakes
bool m_beam_break_debug_enabled
Logging state.
bool ar_physics_paused
Actor physics individually paused by user.
bool m_tractioncontrol
GUI state.
float ar_hydro_dir_command
int ar_buoycab_types[MAX_CABS]
float m_fusealge_width
Physics attr; defined in truckfile.
Airfoil * m_fusealge_airfoil
Physics attr; defined in truckfile.
void CalcShocks3(int i, Ogre::Real difftoBeamL, Ogre::Real &k, Ogre::Real &d, Ogre::Real v)
node_t * m_fusealge_front
Physics attr; defined in truckfile.
bool ar_disable_aerodyn_turbulent_drag
Physics state.
float ar_wheel_spin
Physics state; wheel speed in radians/s.
std::unique_ptr< Buoyance > m_buoyance
node_t * m_fusealge_back
Physics attr; defined in truckfile.
float ar_hydro_elevator_command
int m_stabilizer_shock_request
Physics state; values: { -1, 0, 1 }.
float m_handbrake_force
Physics attr; defined in truckfile.
bool ar_engine_hydraulics_ready
Sim state; does engine have enough RPM to power hydraulics?
Ogre::Vector3 ar_origin
Physics state; base position for softbody nodes.
float m_stabilizer_shock_sleep
Sim state.
float ar_brake_force
Physics attr; filled at spawn.
Ogre::Vector3 getDirection()
average actor velocity, calculated using the actor positions of the last two frames
AeroEnginePtr ar_aeroengines[MAX_AEROENGINES]
float ar_hydro_aileron_command
int ar_num_shocks
Number of shock absorbers.
float ar_total_mass
Calculated; total mass in Kg.
float ar_hydro_aileron_state
float alb_ratio
Anti-lock brake attribute: Regulating force.
bool m_beam_deform_debug_enabled
Logging state.
ActorInstanceID_t ar_instance_id
Static attr; session-unique ID.
float ar_avg_wheel_speed
Physics state; avg wheel speed in m/s.
bool m_has_axles_section
Temporary (legacy parsing helper) until central diffs are implemented.
Ogre::Real ar_brake
Physics state; braking intensity.
Ogre::Vector3 m_camera_gforces_accu
Accumulator for 'camera' G-forces.
void CalcShocks2(int i, Ogre::Real difftoBeamL, Ogre::Real &k, Ogre::Real &d, Ogre::Real v)
NodeNum_t ar_camera_node_pos[MAX_CAMERAS]
Physics attr; 'camera' = frame of reference; origin node.
void CalcAnimators(hydrobeam_t const &hydrobeam, float &cstate, int &div)
Differential * m_wheel_diffs[MAX_WHEELS/2]
Physics.
float alb_pulse_time
Anti-lock brake attribute;.
bool m_water_contact
Scripting state.
float ar_hydro_rudder_command
void CalcAircraftForces(bool doUpdate)
std::vector< beam_t * > ar_inter_beams
Beams connecting 2 actors.
float alb_minspeed
Anti-lock brake attribute;.
void CalcForcesEulerCompute(bool doUpdate, int num_steps)
Ogre::Vector3 m_mouse_grab_pos
bool m_has_command_beams
Physics attr;.
ground_model_t * ar_last_fuzzy_ground_model
GUI state.
void CalcTriggers(int i, Ogre::Real difftoBeamL, bool update_hooks)
Ogre::Vector3 ar_fusedrag
Physics state.
float tc_ratio
Regulating force.
float alb_timer
Anti-lock brake state;.
void CalcTruckEngine(bool doUpdate)
std::vector< hydrobeam_t > ar_hydros
std::vector< std::pair< collision_box_t *, NodeNum_t > > m_active_eventboxes
std::vector< hook_t > ar_hooks
void UpdateBoundingBoxes()
shock_t * ar_shocks
Shock absorbers.
Ogre::Vector3 GetCameraRoll()
bool CalcForcesEulerPrepare(bool doUpdate)
NodeNum_t ar_cinecam_node[MAX_CAMERAS]
Sim attr; Cine-camera node indexes.
bool alb_pulse_state
Anti-lock brake state;.
Ogre::Real ar_hydro_dir_wheel_display
struct RoR::Actor::VehicleForceSensors m_force_sensors
Data for ForceFeedback devices.
bool ar_has_active_shocks
Are there active stabilizer shocks?
void CalcBeamsInterActor()
CollisionBoxPtrVec m_potential_eventboxes
void CalcWheels(bool doUpdate, int num_steps)
ActorType ar_driveable
Sim attr; marks vehicle type and features.
virtual void updateForces(float dt, int doUpdate)=0
void getparams(float a, float cratio, float cdef, float *ocl, float *ocd, float *ocm)
float CalcCmdKeyDelay(float cmd_input, float dt)
bool nodeCollision(node_t *node, float dt)
bool groundCollision(node_t *node, float dt)
void findPotentialEventBoxes(Actor *actor, CollisionBoxPtrVec &out_boxes)
eventsource_t & getEventSource(int pos)
bool isInside(Ogre::Vector3 pos, const Ogre::String &inst, const Ogre::String &box, float border=0)
@ CONSOLE_MSGTYPE_ACTOR
Parsing/spawn/simulation messages for actors.
void putMessage(MessageArea area, MessageType type, std::string const &msg, std::string icon="")
int di_idx_1
array location of wheel / axle 1
int di_idx_2
array location of wheel / axle 2
void CalcAxleTorque(DifferentialData &diff_data)
float di_delta_rotation
difference of rotational position between two wheels/axles... a kludge at best
void setWheelSpin(float rpm)
float getIdleRPM() const
('engoption' attr #8)
void setHydroPump(float work)
void UpdateEngine(float dt, int doUpdate)
void stopEngine()
stall engine
const TerrainPtr & GetTerrain()
void PushMessage(Message m)
Doesn't guarantee order! Use ChainMessage() if order matters.
void updateForces(int update)
void modulate(int actor_id, int mod, float value, int linkType=SL_DEFAULT, int linkItemID=-1)
void trigStart(int actor_id, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
void trigStop(int actor_id, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
Wrapper for classic c-string (local buffer) Refresher: strlen() excludes '\0' terminator; strncat() A...
const char * ToCStr() const
Collisions * GetCollisions()
bool tr_4wd_mode
Enables 4WD mode.
@ SS_MOD_LINKED_COMMANDRATE
@ HYDRO_FLAG_REV_ELEVATOR
@ PRELOCK
prelocking, attraction forces in action
@ MSG_SIM_ACTOR_LINKING_REQUESTED
Payload = RoR::ActorLinkingRequest* (owner)
@ MSG_SIM_SCRIPT_CALLBACK_QUEUED
Payload = RoR::ScriptCallbackArgs* (owner)
@ MSG_SIM_MODIFY_ACTOR_REQUESTED
Payload = RoR::ActorModifyRequest* (owner)
static const float DEFAULT_SPRING
static const float DEFAULT_DRAG
static const float STAB_RATE
static const float DEFAULT_DAMP
static const float SUPPORT_BEAM_LIMIT_DEFAULT
static const float DEFAULT_WATERDRAG
static const float MIN_BEAM_LENGTH
minimum beam lenght is 10 centimeters
@ SHOCK1
either 'shock1' (with flag BEAM_HYDRO) or a wheel beam
@ LOCAL_SIMULATED
simulated (local) actor
void TRIGGER_EVENT_ASYNC(scriptEvents type, int arg1, int arg2ex=0, int arg3ex=0, int arg4ex=0, std::string arg5ex="", std::string arg6ex="", std::string arg7ex="", std::string arg8ex="")
Asynchronously (via MSG_SIM_SCRIPT_EVENT_TRIGGERED) invoke script function eventCallbackEx(),...
SoundScriptManager * GetSoundScriptManager()
GameContext * GetGameContext()
CVar * io_analog_sensitivity
CVar * io_analog_smoothing
static const NodeNum_t NODENUM_INVALID
void Log(const char *msg)
The ultimate, application-wide logging function. Adds a line (any length) in 'RoR....
static const CineCameraID_t CINECAMERAID_INVALID
@ SE_EVENTBOX_EXIT
Actor or person left an eventbox; arguments: #1 type, #2 actorID (actor only), #3 unused,...
@ SE_EVENTBOX_ENTER
Actor or person entered an eventbox; arguments: #1 type, #2 actorID (actor only), #3 node ID (actor o...
@ EVENT_TRUCK_WHEELS
'truck_wheels' ~ Triggered only by wheel nodes of land vehicle (ActorType::TRUCK)
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
@ FOOT_ONLY
= yes footbrake, no handbrake, no direction control – footbrake only, such as with the front wheels o...
@ FOOT_HAND_SKID_RIGHT
= yes footbrake, yes handbrake, yes direction control (braked when vehicle steers to the right)
@ FOOT_HAND_SKID_LEFT
= yes footbrake, yes handbrake, yes direction control (braked when vehicle steers to the left)
@ NONE
= no footbrake, no handbrake, no direction control – wheel is unbraked
Ogre::Vector3 accu_body_forces
Estabilishing a physics linkage between 2 actors modifies a global linkage table and triggers immedia...
ActorLinkingRequestType alr_type
ActorInstanceID_t alr_actor_instance_id
ActorInstanceID_t amr_actor
Unified game event system - all requests and state changes are reported using a message.
Simulation: An edge in the softbody structure.
float debug_v
debug shock velocity
float refL
reference length
float debug_d
debug shock damping
int detacher_group
Attribute: detacher group number (integer)
float debug_k
debug shock spring_rate
CollisionEventFilter event_filter
float cmb_engine_coupling
Attr from truckfile.
uint16_t cmb_beam_index
Index to Actor::ar_beams array.
bool cmb_is_contraction
Attribute defined at spawn.
float cmb_center_length
Attr computed at spawn.
bool cmb_needs_engine
Attribute defined in truckfile.
bool cmb_is_force_restricted
Attribute defined in truckfile.
float cmb_boundary_length
Attr; Maximum/minimum length proportional to orig. len.
bool cmb_is_1press
Attribute defined in truckfile.
float cmb_speed
Attr; Rate of contraction/extension.
bool cmb_is_autocentering
Attribute defined in truckfile.
bool cmb_is_1press_center
Attribute defined in truckfile.
bool cmb_plays_sound
Attribute defined in truckfile.
std::shared_ptr< commandbeam_state_t > cmb_state
std::string es_box_name
Specified in ODEF file as "event".
std::string es_instance_name
Specified by user when calling "GameScript::spawnObject()".
< beams updating length based on simulation variables, generally known as actuators.
BitMask_t hb_flags
Only for 'hydros'.
float hb_speed
Rate of change.
RoR::CmdKeyInertia hb_inertia
uint16_t hb_beam_index
Index to Actor::ar_beams array.
BitMask_t hb_anim_flags
Only for 'animators'.
float hb_ref_length
Idle length in meters.
Physics: A vertex in the softbody structure.
Ogre::Vector3 AbsPosition
absolute position in the world (shaky)
bool nd_has_ground_contact
Physics state.
Ogre::Vector3 nd_last_collision_force
Physics state; last collision force.
bool nd_under_water
State; GFX hint.
Ogre::Vector3 RelPosition
relative to the local physics origin (one origin per actor) (shaky)
Ogre::Vector3 nd_last_collision_slip
Physics state; last collision slip vector.
bool nd_cab_node
Attr; This node is part of collision triangle.
ground_model_t * nd_last_collision_gm
Physics state; last collision 'ground model' (surface definition)
bool nd_tyre_node
Attr; This node is part of a tyre (note some wheel types don't use rim nodes at all)
NodeNum_t pos
This node's index in Actor::ar_nodes array.
float sbd_damp
set beam default for damping
float sbd_spring
set beam default for spring
Ogre::Real wh_tc_coef
Sim state; Current traction control modulation ratio.
Ogre::Real wh_speed
Current wheel speed in m/s.
Ogre::Real wh_last_torque
Last internal forces (engine / brakes / diffs)
Ogre::Real wh_last_retorque
Last external forces (friction, ...)
Ogre::Vector3 debug_force
node_t * wh_near_attach_node
Ogre::Real wh_mass
Total rotational mass of the wheel.
Ogre::Real wh_avg_speed
Internal physics state; Do not read from this.
Ogre::Vector3 debug_scaled_cforce
Ogre::Real wh_alb_coef
Sim state; Current anti-lock brake modulation ratio.
Ogre::Real wh_torque
Internal physics state; Do not read from this.