doc
parent
cb3be20e00
commit
18cbe2723c
|
@ -12,7 +12,7 @@
|
|||
![Image text](image/collision-5.png)
|
||||
![Image text](image/collision-6.png)
|
||||
|
||||
# 2. 刚体
|
||||
# 2. RigidBody
|
||||
|
||||
- 刚体是组成物理世界的基本对象,你可以将刚体想象成一个你不能看到(绘制)也不能摸到(碰撞)的带有属性的物体。
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
- torque,扭矩
|
||||
- damp,衰减系数,值越大物体移动越慢,可以用来模拟空气摩擦力等效果。
|
||||
|
||||
# 3. 物理实战
|
||||
# 3. 刚体
|
||||
|
||||
- RigidBody,动态刚体,有质量,可以设置速度,会受到重力影响。
|
||||
|
||||
|
@ -36,4 +36,7 @@
|
|||
|
||||
- Area2D,一块区域,能够检测到物体的碰撞,但是不会做任何操作
|
||||
|
||||
- 碰撞检测Layer和Mask
|
||||
- 碰撞检测Layer和Mask,Layer表明当前刚体属于那一层,Mask表面当前
|
||||
|
||||
![Image text](image/collision-9.JPG)
|
||||
![Image text](image/collision-10.JPG)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 162 KiB |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/collision-10.JPG-43a1d950b76c7ebd07e260480ea153e2.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://doc/demo07_collision/image/collision-10.JPG"
|
||||
dest_files=[ "res://.import/collision-10.JPG-43a1d950b76c7ebd07e260480ea153e2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/collision-9.JPG-e1dae7ad681902cbeeb4238adb430b10.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://doc/demo07_collision/image/collision-9.JPG"
|
||||
dest_files=[ "res://.import/collision-9.JPG-e1dae7ad681902cbeeb4238adb430b10.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
|
@ -45,7 +45,6 @@ extents = Vector2( 30.17, 29.3458 )
|
|||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
||||
position = Vector2( 64.5824, 547.095 )
|
||||
collision_layer = 2
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="StaticBody2D"]
|
||||
color = Color( 0.329412, 0.580392, 0.270588, 1 )
|
||||
|
|
Loading…
Reference in New Issue