mobile support tweaks
This commit is contained in:
@@ -93,12 +93,19 @@ const _TURN_FACE: float = 16.0 # face the bull while engaging
|
||||
const _TURN_SHARP: float = 24.0 # snap onto a sidestep / roll direction
|
||||
|
||||
|
||||
const RigidSkin = preload("res://rigid_skin.gd")
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
add_to_group(&"matador")
|
||||
_skeleton = _find_skeleton(_mesh)
|
||||
_anim_player = _find_anim_player(_mesh)
|
||||
if _skeleton:
|
||||
_sim = MatadorRagdoll.build(_skeleton)
|
||||
# Web (Mali/ANGLE) can't run Compatibility vertex-skinning; rebuild as non-skinned
|
||||
# bone-attached pieces. Runs after the ragdoll sim is built (both drive the same bones).
|
||||
if OS.has_feature("web"):
|
||||
RigidSkin.convert_tree(self)
|
||||
if _anim_player:
|
||||
for anim in [_ANIM_RUN, _ANIM_ATTACK] + _ANIM_TAUNTS:
|
||||
_ensure_loop(anim)
|
||||
|
||||
Reference in New Issue
Block a user