Implements the algorithm the README has listed as "still to come" since v0. A 3x3x5 lattice of control points encloses the car; an impact shoves nearby points inward and mesh vertices follow via inverse-distance weighting (W_i = 1/||p_j - c_i||^alpha, alpha=2), clamped to the PDF's bounding-box safety limit so panels crumple rather than fold through themselves. The weights depend only on original positions, so they're precomputed once per car at setup -- each impact is then a plain weighted sum at 0.3 ms, with no per-frame cost at all. Meshes are deep-copied per car so deforming one Kingswood doesn't dent every other Kingswood sharing the GLB. Measured on the Lazza: a hard nose-on hit displaces 11.9 cm, accumulating to 18.2 cm over repeat hits, well inside the 42 cm clamp. Only the player and rivals carry a deformer; traffic and parked cars stay plain bodies. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
41 lines
958 B
Plaintext
41 lines
958 B
Plaintext
[remap]
|
|
|
|
importer="texture"
|
|
type="CompressedTexture2D"
|
|
uid="uid://caxvklepgk1l0"
|
|
path="res://.godot/imported/shot_deform_before.png-f2ee82086fe3fb722b601ee9d7cccf9e.ctex"
|
|
metadata={
|
|
"vram_texture": false
|
|
}
|
|
|
|
[deps]
|
|
|
|
source_file="res://shot_deform_before.png"
|
|
dest_files=["res://.godot/imported/shot_deform_before.png-f2ee82086fe3fb722b601ee9d7cccf9e.ctex"]
|
|
|
|
[params]
|
|
|
|
compress/mode=0
|
|
compress/high_quality=false
|
|
compress/lossy_quality=0.7
|
|
compress/uastc_level=0
|
|
compress/rdo_quality_loss=0.0
|
|
compress/hdr_compression=1
|
|
compress/normal_map=0
|
|
compress/channel_pack=0
|
|
mipmaps/generate=false
|
|
mipmaps/limit=-1
|
|
roughness/mode=0
|
|
roughness/src_normal=""
|
|
process/channel_remap/red=0
|
|
process/channel_remap/green=1
|
|
process/channel_remap/blue=2
|
|
process/channel_remap/alpha=3
|
|
process/fix_alpha_border=true
|
|
process/premult_alpha=false
|
|
process/normal_map_invert_y=false
|
|
process/hdr_as_srgb=false
|
|
process/hdr_clamp_exposure=false
|
|
process/size_limit=0
|
|
detect_3d/compress_to=1
|