unreal.WheeledVehicleMovementComponent
¶
- class unreal.WheeledVehicleMovementComponent(outer=None, name='None')¶
Bases:
unreal.PawnMovementComponent
Wheeled Vehicle Movement Component
C++ Source:
Plugin: PhysXVehicles
Module: PhysXVehicles
File: WheeledVehicleMovementComponent.h
Editor Properties: (see get_editor_property/set_editor_property)
asset_user_data
(Array(AssetUserData)): [Read-Write] Array of user data stored with the componentauto_activate
(bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.auto_register_physics_volume_updates
(bool): [Read-Write] If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. see: bComponentShouldUpdatePhysicsVolumeauto_register_updated_component
(bool): [Read-Write] If true, registers the owner’s Root component as the UpdatedComponent if there is not one currently assigned.auto_update_tick_registration
(bool): [Read-Write] If true, whenever the updated component is changed, this component will enable or disable its tick dependent on whether it has something to update. This will NOT enable tick at startup if bAutoActivate is false, because presumably you have a good reason for not wanting it to start ticking initially.avoidance_consideration_radius
(float): [Read-Write] Area Radius to consider for RVO avoidanceavoidance_group
(NavAvoidanceMask): [Read-Write] Moving actor’s group maskavoidance_uid
(int32): [Read-Only] No default value, for now it’s assumed to be valid if GetAvoidanceManager() returns non-NULL.avoidance_weight
(float): [Read-Write] De facto default value 0.5 (due to that being the default in the avoidance registration function), indicates RVO behavior.brake_input_rate
(VehicleInputRate): [Read-Write] Rate at which input brake can rise and fallcan_ever_affect_navigation
(bool): [Read-Write] Whether this component can potentially influence navigationchassis_height
(float): [Read-Write] Chassis height used for drag force computation (cm)chassis_width
(float): [Read-Write] Chassis width used for drag force computation (cm)component_should_update_physics_volume
(bool): [Read-Write] If true, enables bShouldUpdatePhysicsVolume on the UpdatedComponent during initialization from SetUpdatedComponent(), otherwise disables such updates. Only enabled if bAutoRegisterPhysicsVolumeUpdates is true. WARNING: UpdatePhysicsVolume is potentially expensive if overlap events are also disabled because it requires a separate query against all physics volumes in the world.component_tags
(Array(Name)): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.constrain_to_plane
(bool): [Read-Write] If true, movement will be constrained to a plane. see: PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSettingdeprecated_spring_offset_mode
(bool): [Read-Write] Supports the old (before 4.14) way of applying spring forces. We used to offset from the vehicle center of mass instead of the spring location center of mass. You should only use this for existing content that hasn’t been re-tuneddrag_coefficient
(float): [Read-Write] DragCoefficient of the vehicle chassis.editable_when_inherited
(bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor classfixed_path_braking_distance
(float): [Read-Write] Braking distance override used with acceleration driven path following (bUseAccelerationForPaths)groups_to_avoid
(NavAvoidanceMask): [Read-Write] Will avoid other agents if they are in one of specified groupsgroups_to_ignore
(NavAvoidanceMask): [Read-Write] Will NOT avoid other agents if they are in one of specified groups, higher priority than GroupsToAvoidhandbrake_input_rate
(VehicleInputRate): [Read-Write] Rate at which input handbrake can rise and fallhigh_forward_speed_sub_step_count
(int32): [Read-Write] The sub-step count above the threshold longitudinal speed has a default of 1.idle_brake_input
(float): [Read-Write] How much to press the brake when the player has release throttleinertia_tensor_scale
(Vector): [Read-Write] Scales the vehicle’s inertia in each direction (forward, right, up)is_editor_only
(bool): [Read-Write] If true, the component will be excluded from non-editor buildslow_forward_speed_sub_step_count
(int32): [Read-Write] The sub-step count below the threshold longitudinal speed has a default of 3.mass
(float): [Read-Write] Mass to set the vehicle chassis to. It’s much easier to tweak vehicle settings when the mass doesn’t change due to tweaks with the physics asset. [kg]max_normalized_tire_load
(float): [Read-Write] Clamp normalized tire load to this valuemax_normalized_tire_load_filtered
(float): [Read-Write] Clamp normalized tire load to this valuemin_normalized_tire_load
(float): [Read-Write] Clamp normalized tire load to this valuemin_normalized_tire_load_filtered
(float): [Read-Write] Clamp normalized tire load to this valuenav_agent_props
(NavAgentProperties): [Read-Write] Properties that define how the component can move.on_component_activated
(ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reseton_component_deactivated
(ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivatedplane_constraint_axis_setting
(PlaneConstraintAxisSetting): [Read-Write] Setting that controls behavior when movement is restricted to a 2D plane defined by a specific axis/normal, so that movement along the locked axis is not be possible. see: SetPlaneConstraintAxisSettingplane_constraint_normal
(Vector): [Read-Write] The normal or axis of the plane that constrains movement, if bConstrainToPlane is enabled. If for example you wanted to constrain movement to the X-Z plane (so that Y cannot change), the normal would be set to X=0 Y=1 Z=0. This is recalculated whenever PlaneConstraintAxisSetting changes. It is normalized once the component is registered with the game world. see: bConstrainToPlane, SetPlaneConstraintNormal(), SetPlaneConstraintFromVectors()plane_constraint_origin
(Vector): [Read-Write] The origin of the plane that constrains movement, if plane constraint is enabled. This defines the behavior of snapping a position to the plane, such as by SnapUpdatedComponentToPlane(). see: bConstrainToPlane, SetPlaneConstraintOrigin().primary_component_tick
(ActorComponentTickFunction): [Read-Write] Main tick function for the Componentreplicates
(bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!reverse_as_brake
(bool): [Read-Write] If true, the brake and reverse controls will behave in a more arcade fashion where holding reverse also functions as brake. For a more realistic approach turn this offrvo_avoidance_height
(float): [Read-Write] Vehicle Height to use for RVO avoidance (usually vehicle height)rvo_avoidance_radius
(float): [Read-Write] Vehicle Radius to use for RVO avoidance (usually half of vehicle width)rvo_steering_step
(float): [Read-Write] Value by which to alter steering per frame based on calculated avoidancervo_throttle_step
(float): [Read-Write] Value by which to alter throttle per frame based on calculated avoidancesnap_to_plane_at_start
(bool): [Read-Write] If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached.steering_input_rate
(VehicleInputRate): [Read-Write] Rate at which input steering can rise and fallstop_threshold
(float): [Read-Write] Auto-brake when absolute vehicle forward speed is less than this (cm/s)threshold_longitudinal_speed
(float): [Read-Write] PhysX sub-stepsMore sub-steps provides better stability but with greater computational cost. Typically, vehicles require more sub-steps at very low forward speeds. The threshold longitudinal speed has a default value of 5 metres per second.
throttle_input_rate
(VehicleInputRate): [Read-Write] Rate at which input throttle can rise and falltick_before_owner
(bool): [Read-Write] If true, after registration we will add a tick dependency to tick before our owner (if we can both tick). This is important when our tick causes an update in the owner’s position, so that when the owner ticks it uses the most recent position without lag. Disabling this can improve performance if both objects tick but the order of ticks doesn’t matter.update_nav_agent_with_owners_collision
(bool): [Read-Write] If set to true NavAgentProps’ radius and height will be updated with Owner’s collision capsule sizeupdate_only_if_rendered
(bool): [Read-Write] If true, skips TickComponent() if UpdatedComponent was not recently rendered.updated_component
(SceneComponent): [Read-Write] The component we move and update. If this is null at startup and bAutoRegisterUpdatedComponent is true, the owning Actor’s root component will automatically be set as our UpdatedComponent at startup. see: bAutoRegisterUpdatedComponent, SetUpdatedComponent(), UpdatedPrimitiveupdated_primitive
(PrimitiveComponent): [Read-Write] UpdatedComponent, cast as a UPrimitiveComponent. May be invalid if UpdatedComponent was null or not a UPrimitiveComponent.use_acceleration_for_paths
(bool): [Read-Write] If set, pathfollowing will control character movement via acceleration values. If false, it will set velocities directly.use_fixed_braking_distance_for_paths
(bool): [Read-Write] If set, FixedPathBrakingDistance will be used for path following decelerationuse_rvo_avoidance
(bool): [Read-Write] If set, component will use RVO avoidancevelocity
(Vector): [Read-Write] Current velocity of updated component.wheel_setups
(Array(WheelSetup)): [Read-Write] Wheels to createwheels
(Array(VehicleWheel)): [Read-Write] Our instanced wheelswrong_direction_threshold
(float): [Read-Write] Auto-brake when vehicle forward speed is opposite of player input by at least this much (cm/s)
- property avoidance_consideration_radius¶
[Read-Write] Area Radius to consider for RVO avoidance
- Type
(float)
- property avoidance_group¶
[Read-Only] Moving actor’s group mask
- Type
- property avoidance_uid¶
[Read-Only] No default value, for now it’s assumed to be valid if GetAvoidanceManager() returns non-NULL.
- Type
(int32)
- property avoidance_weight¶
[Read-Only] De facto default value 0.5 (due to that being the default in the avoidance registration function), indicates RVO behavior.
- Type
(float)
- get_current_gear() → int32¶
Get current gear
- Returns
- Return type
int32
- get_engine_max_rotation_speed() → float¶
Get current engine’s max rotation speed
- Returns
- Return type
- get_target_gear() → int32¶
Get target gear
- Returns
- Return type
int32
- property groups_to_avoid¶
[Read-Only] Will avoid other agents if they are in one of specified groups
- Type
- property groups_to_ignore¶
[Read-Only] Will NOT avoid other agents if they are in one of specified groups, higher priority than GroupsToAvoid
- Type
- property rvo_avoidance_height¶
[Read-Write] Vehicle Height to use for RVO avoidance (usually vehicle height)
- Type
(float)
- property rvo_avoidance_radius¶
[Read-Write] Vehicle Radius to use for RVO avoidance (usually half of vehicle width)
- Type
(float)
- property rvo_steering_step¶
[Read-Write] Value by which to alter steering per frame based on calculated avoidance
- Type
(float)
- property rvo_throttle_step¶
[Read-Write] Value by which to alter throttle per frame based on calculated avoidance
- Type
(float)
- set_avoidance_enabled(enable) → None¶
Change avoidance state and register with RVO manager if necessary
- Parameters
enable (bool) –
- set_avoidance_group(group_flags) → None¶
Set Avoidance Group deprecated: Please use SetAvoidanceGroupMask function instead.
- Parameters
group_flags (int32) –
- set_avoidance_group_mask(group_mask) → None¶
Set Avoidance Group Mask
- Parameters
group_mask (NavAvoidanceMask) –
- set_gear_down(new_gear_down) → None¶
Set the user input for gear down
- Parameters
new_gear_down (bool) –
- set_groups_to_avoid(group_flags) → None¶
Set Groups to Avoid deprecated: Please use SetGroupsToAvoidMask function instead.
- Parameters
group_flags (int32) –
- set_groups_to_avoid_mask(group_mask) → None¶
Set Groups to Avoid Mask
- Parameters
group_mask (NavAvoidanceMask) –
- set_groups_to_ignore(group_flags) → None¶
Set Groups to Ignore deprecated: Please use SetGroupsToIgnoreMask function instead.
- Parameters
group_flags (int32) –
- set_groups_to_ignore_mask(group_mask) → None¶
Set Groups to Ignore Mask
- Parameters
group_mask (NavAvoidanceMask) –
- set_handbrake_input(new_handbrake) → None¶
Set the user input for handbrake
- Parameters
new_handbrake (bool) –
- set_steering_input(steering) → None¶
Set the user input for the vehicle steering
- Parameters
steering (float) –
- set_target_gear(gear_num, immediate) → None¶
Set the user input for gear (-1 reverse, 0 neutral, 1+ forward)
- Parameters
gear_num (int32) –
immediate (bool) –
- set_throttle_input(throttle) → None¶
Set the user input for the vehicle throttle
- Parameters
throttle (float) –
- set_use_auto_gears(use_auto) → None¶
Set the flag that will be used to select auto-gears
- Parameters
use_auto (bool) –
- property wheels¶
[Read-Only] Our instanced wheels
- Type