Make sure the direction of the motion is preserved, unless the depth is higher than the margin, which means the body needs depenetration in any direction. Also changed move_and_slide to avoid sliding on the first motion, in order to avoid issues with unstable position on ground when jumping. Co-authored-by: fabriceci <fabricecipolla@gmail.com>
39 lines
1.6 KiB
XML
39 lines
1.6 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="Physics2DTestMotionResult" inherits="Reference" version="3.4">
|
|
<brief_description>
|
|
</brief_description>
|
|
<description>
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
</methods>
|
|
<members>
|
|
<member name="collider" type="Object" setter="" getter="get_collider">
|
|
</member>
|
|
<member name="collider_id" type="int" setter="" getter="get_collider_id" default="0">
|
|
</member>
|
|
<member name="collider_rid" type="RID" setter="" getter="get_collider_rid">
|
|
</member>
|
|
<member name="collider_shape" type="int" setter="" getter="get_collider_shape" default="0">
|
|
</member>
|
|
<member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2( 0, 0 )">
|
|
</member>
|
|
<member name="collision_depth" type="float" setter="" getter="get_collision_depth" default="0.0">
|
|
</member>
|
|
<member name="collision_normal" type="Vector2" setter="" getter="get_collision_normal" default="Vector2( 0, 0 )">
|
|
</member>
|
|
<member name="collision_point" type="Vector2" setter="" getter="get_collision_point" default="Vector2( 0, 0 )">
|
|
</member>
|
|
<member name="collision_safe_fraction" type="float" setter="" getter="get_collision_safe_fraction" default="0.0">
|
|
</member>
|
|
<member name="collision_unsafe_fraction" type="float" setter="" getter="get_collision_unsafe_fraction" default="0.0">
|
|
</member>
|
|
<member name="motion" type="Vector2" setter="" getter="get_motion" default="Vector2( 0, 0 )">
|
|
</member>
|
|
<member name="motion_remainder" type="Vector2" setter="" getter="get_motion_remainder" default="Vector2( 0, 0 )">
|
|
</member>
|
|
</members>
|
|
<constants>
|
|
</constants>
|
|
</class>
|