Difference between revisions of "LlGetPhysicsMaterial/ja"

From Second Life Wiki
Jump to navigation Jump to search
(copy from english(Todo: need translate to japanese))
 
m
Line 1: Line 1:
{{LSL Function
{{LSL Function/ja
|inject-2={{LSL Function/physics materials}}
|inject-2={{LSL Function/physics materials}}
|func=llGetPhysicsMaterial
|func=llGetPhysicsMaterial

Revision as of 13:09, 2 November 2023

要約

関数: list llGetPhysicsMaterial( );

Used to get the physical characteristics of an object.
in the form float gravity_multiplier, float restitution, float friction, float density ]

• float gravity_multiplier range [-1.0, +28.0], default: 1.0
• float restitution range [0.0, 1.0], default: [0.3, 0.9] [1]
• float friction range [0.0, 255.0], default: [0.2, 0.9][1]
• float density range [1.0, 22587.0] kg/m^3, default: 1000.0
を list で返します。

The default values for friction and restitution depend upon the material type.

警告

  • A collision between two objects with restitution 1.0 will still not be perfectly elastic due to damping in the physics engine.
All Issues ~ Search JIRA for related Bugs

サンプル

default
{
    touch_start(integer total_number)
    {
        list params = llGetPhysicsMaterial();
        llOwnerSay(
            "\nGravity multiplier: " + (string)llList2Float(params, 0) +
            "\nRestitution: " + (string)llList2Float(params, 1) +
            "\nFriction: " + (string)llList2Float(params, 2) +
            "\nDensity: " + (string)llList2Float(params, 3) + "kg/m^3"
        );
    }
}

関連項目

定数

•  PRIM_MATERIAL

関数

•  llSetPhysicsMaterial

特記事項

Material Defaults

material Flags Description Friction Restitution
PRIM_MATERIAL_STONE 0 stone 0.8 0.4
PRIM_MATERIAL_METAL 1 metal 0.3 0.4
PRIM_MATERIAL_GLASS 2 glass 0.2 0.7
PRIM_MATERIAL_WOOD 3 wood 0.6 0.5
PRIM_MATERIAL_FLESH 4 flesh 0.9 0.3
PRIM_MATERIAL_PLASTIC 5 plastic 0.4 0.7
PRIM_MATERIAL_RUBBER 6 rubber 0.9 0.9
PRIM_MATERIAL_LIGHT 7 light, DEPRECATED: Looks the same as [ PRIM_FULLBRIGHT, ALL_SIDES, TRUE ] 0.6 0.5

経緯

Date of Release 23/09/2011

Search JIRA for related Issues

テスト

•  Physics Material Settings test

脚注

  1. ^ The default values for friction and restitution depend upon the prim's material.
  2. ^ 記事中の範囲は、 実数空間 に記載されているものです。

Signature

function list llGetPhysicsMaterial();
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。