Changes between Version 21 and Version 22 of vehicle


Ignore:
Timestamp:
Sep 20, 2015, 6:21:58 PM (3 years ago)
Author:
cameni
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • vehicle

    v21 v22  
    1717|| **event** || engine || bool //start// - true for engine starting, false when stopping || invoked when the engine is started or stopped ||
    1818|| **event** || update_frame || //dt// - delta time from previous frame[[br]] //engine// - engine power (-1 .. 1), gas pedal state[[br]] //brake// - brake pedal (0..1)[[br]] //steering// - steering state (-1..1) || invoked each frame to handle the internal state of the object ||
    19 || **event** || action || int //code// - [[action_code|action code]][[br]] float //value// - buttons: 1-pressed, 0-released; axis: -1..1 || invoked for each action (extra key pressed/released) ||
    2019|| **event** || switch_seat || int //seat// - seat id to switch to || handle seat and camera switching[[br]]should return false if given seat/camera id is not present ||
    2120|| method || get_geomob || //id// - id of geometry object (default 0) || returns a [[geomob|geometry object]] that can be used to animate the model joints according to the current state ||
     
    4645|| method || animate_wheels || || articulate wheel joints according to the current state[[br]]Note: this method simplifies the animation of wheels for basic cases, without needing to animate the model via the [[geomob|geomob interface]]. However, this assumes that the wheel pivot uses a [[modelspace|standard coordinate system]], otherwise the wheels can behave oddly when animated ||
    4746|| method || extra_force || float3 //pos// - model-space position where the force acts[[br]]float3 //force// - force vector in model-space coordinates (in Newtons) || apply extra force impulse anywhere on the object ||
     47|| method || fire || float3 //pos// - model-space position[[br]] float3 //dir// - model-space direction of firing[[br]] float //speed// - firing speed[[br]] float //caliber// - trace diameter[[br]] float3 //color// - tracer color || fire a colored plasma tracer ||
    4848|| method || mass || float //m// - mass in kg || set new object mass (usable for submarines and loads ||
    4949|| method || solar_time || || returns {time, sun_coef} object[[br]] //time// - solar time at vehicle location, in miliseconds[[br]] //sun_coef// - sun position relative to horizon: 0 sun at horizon, 1 sun at zenith, -1 sun at anti-zenith ||