这篇条目有关 Source引擎。如需详情,点击这里。

prop_sphere

From Valve Developer Community
< Zh
Revision as of 02:26, 30 June 2025 by WoShiGeNiCheng (talk | contribs) (Created page with "{{Ent not in fgd}} {{CD|CPhysSphere|file1=props.cpp}} {{this is a|模型实体|name=prop_sphere|engine=Source}} 这是一个本质上等同于{{L|prop_physics}}的实体,但具有完美的球形{{L|VPhysics}}碰撞模型(半径12单位)。如果您需要创建球形实体,使用prop_sphere远比尝试创建球形{{L|collision mesh|碰撞网格}}要高效得多! {{tip|半条命2中唯一的球形模型是<code>models\combine_helicopter\helicopter_bomb01.mdl</co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Icon-NotInFGD.png
此实体默认存在于 FGD
请参阅下面的内容以获取有关使其可用的说明。
C++ 类层级
CPhysSphere
CPhysicsProp
CBreakableProp
CBaseProp
CBaseAnimating
CBaseEntity
C++ props.cpp

prop_sphere是一个模型实体,可在所有的 起源 起源 游戏中使用。 这是一个本质上等同于prop_physics(en)的实体,但具有完美的球形VPhysics(en)碰撞模型(半径12单位)。如果您需要创建球形实体,使用prop_sphere远比尝试创建球形碰撞网格(en)要高效得多!

Tip.png提示:半条命2中唯一的球形模型是models\combine_helicopter\helicopter_bomb01.mdl
证实:并非所有prop_physics的键值都适用于此实体。例如修改modelscale(en)会影响物理效果。
Icon-Bug.png错误:使用vcollide_wireframe(en) 1命令时不会显示碰撞网格。  [todo tested in ?]

键值

Radius (radius) <浮点型(en)> (存在于 传送门 2:社区特供版Garry's Mod 之中)
球体半径

FGD代码

如果您不打算修改实体的C++代码,可以使用以下定义: 英文原代码:

@PointClass base(BasePropPhysics, RenderFields) studioprop() = prop_sphere : "Creates a perfect sphere."
[
]

中文代码(如有需要):

@PointClass base(BasePropPhysics, RenderFields) studioprop() = prop_sphere : "创建一个完美球体"
[
]

相关链接