Authoritative Unity 6000.5 PhysicsCore2D API reference for Math Utilities. Lists every type, property, field, method (with signatures, params, returns) for: PhysicsMath. Use whenever working with these types in code.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Authoritative Unity 6000.5 PhysicsCore2D API reference for Math Utilities. Lists every type, property, field, method (with signatures, params, returns) for: PhysicsMath. Use whenever working with these types in code.
Unity PhysicsCore2D API — Math Utilities
This skill is the auto-generated API surface for the listed types. It pre-dates Claude's training data on Unity 6000.5, so it should be treated as the source of truth for member names, signatures, and documentation strings.
Generated from Unity 6000.5.0b9 UnityEngine.PhysicsCore2DModule.xml.
Top-level types in this file: PhysicsMath.
PhysicsMath
A set of mathematical operations that are useful for physics. These operations do not form a fully comprehensive mathematics library, they simply provide operations that are usually required when interacting with physics.
Calculate a given a 2D angular velocity and a time to integrate over using the selected transform plane. If is used, will be used instead which may not provide the correct results.
Params:
angularVelocity — The 2D angular velocity, in radians.
deltaTime — The time over which to apply the angular velocity, in seconds.
transformPlane — The transform plane to use.
Returns: The transformed rotation.
Atan2(float, float)
Calculate the arc-tangent i.e. the angle of the provided slope y/x. This operates as deterministically as possible across platforms.
Params:
y — The Y axis.
x — The X axis.
Returns: The angle in radians.
CosSin(float, float, float)
Calculate both the Cosine and Sine of the specified angle.
Params:
angle — The angle to calculate, in radians.
cosine — The Cosine of the specified angle.
sine — The Sine of the specified angle.
CosSin(float)
Calculate both the Cosine and Sine of the specified angle.
Params:
angle — The angle to calculate, in radians.
Returns: A 2D vector where X is the Cosine and Y is the Sine of the specified angle.
Get the relative transformation matrix between the two specified transforms using the specified transform plane. If is used, will be used instead which may not provide the correct results.
Params:
transformFrom — The transform used as a reference to transform from.
transformTo — The transform used as a reference to transform to.
transformPlane — The transform plane to use.
useScale — If the returned matrix should include scale.
Returns: The calculated relative transformation matrix.
Get the relative transformation matrix between the two specified transform matrix using the specified transform plane to transform into 2D space i.e. XY position and Z rotation.
Params:
transformFrom — The transform used as a reference to transform from.
transformTo — The transform used as a reference to transform to.
transformPlane — The transform plane to use.
transformPlaneCustom — The custom transform plane to use (if required).
useScale — If the returned matrix should include scale. Scale is not relative and always uses the transformTo lossyScale.
Returns: The calculated relative transformation matrix.
Get the relative transformation pose (translation, rotation and scale) between the two specified transform matrix using the specified transform plane to transform into 2D space.
Params:
transformFrom — The transform used as a reference to transform from.
transformTo — The transform used as a reference to transform to.
transformPlane — The transform plane to use.
transformPlaneCustom — The custom transform plane to use (if required).
translation — The 2D relative translation.
rotation — The 2D relative rotation.
scale — The 2D relative scale. Scale is not relative and always uses the transformTo lossyScale.
GetRotationAxes(PhysicsWorld.TransformPlane)
Get the used rotation axes, given the specified transform plane. This is the inverse of . If is used, will be used instead which may not provide the correct results.
Params:
transformPlane — The transform plane to use.
Returns: The used rotation axes. 0 indicates an axis is ignored whereas 1 indicates the axis is used.
Get the ignored rotation axes, given the specified transform plane. This is the inverse of . If is used, will be used instead which may not provide the correct results.
Params:
transformPlane — The transform plane to use.
Returns: The ignored rotation axes. 0 indicates an axis is used whereas 1 indicates the axis is ignored.
GetTranslationAxes(PhysicsWorld.TransformPlane)
Get the used translation axes, given the specified transform plane. This is the inverse of . If is used, will be used instead which may not provide the correct results.
Params:
transformPlane — The transform plane to use.
Returns: The used translation axes. 0 indicates an axis is ignored whereas 1 indicates the axis is used.
Get the ignored translation axes, given the specified transform plane. This is the inverse of . If is used, will be used instead which may not provide the correct results.
Params:
transformPlane — The transform plane to use.
Returns: The ignored translation axes. 0 indicates an axis is used whereas 1 indicates the axis is ignored.
Set the Transform position and rotation using the specified . For position, only two axis will be updated with the others remaining unchanged. For rotation, only a single rotation axis will be changed with the others set to zero. See: and .
Params:
physicsTransform — The physics transform to use as the source of the pose.
transform — The Transform to set.
transformPlane — The transform plane to use.
transformChangedEvent — By default, no transform changed event will be produced however this behaviour can be overridden with this argument.
Set the Transform position and rotation using the specified . For position, only two axis will be updated with the others remaining unchanged. For rotation, only a single rotation axis will be changed with the others remaining unchanged. See: and .
Params:
physicsTransform — The physics transform to use as the source of the pose.
transform — The Transform to set.
transformPlane — The transform plane to use.
transformChangedEvent — By default, no transform changed event will be produced however this behaviour can be overridden with this argument.
SpringDamper(float, float, float, float, float)
Calculate a one-dimensional mass-spring-damper simulation which drives towards a zero translation. You can then compute the new position using: "translation += newSpeed * deltaTime;"
Params:
frequency — The frequency of the spring, in cycles per second.
damping — The damping of the spring. Must be >= zero.
translation — The current translation of the spring.
speed — The current speed of the spring.
deltaTime — The time over which to simulate the spring.
Returns: The new calculated spring speed.
Swizzle(Vector3, PhysicsWorld.TransformPlane)
Transform a 3D vector into a 3D vector using the selected transform plane. If is used, will be used instead which may not provide the correct results.
Params:
position — The 3D vector to transform.
transformPlane — The transform plane to use.
Returns: The transformed vector.
Swizzle(Vector4, PhysicsWorld.TransformPlane)
Transform a 3D position (with perspective divide) into a 3D position using the selected transform plane. If is used, will be used instead which may not provide the correct results.
Params:
position — The 3D position to transform.
transformPlane — The transform plane to use.
Returns: The transformed position.
Swizzle(Matrix4x4, PhysicsWorld.TransformPlane)
Transform a Matrix position (with perspective divide) into a Matrix position using the selected transform plane. If is used, will be used instead which may not provide the correct results.
Params:
matrix — The Matrix position to transform.
transformPlane — The transform plane to use.
Returns: The transformed matrix.
ToDegrees(float)
Convert radians to degrees. This operates as deterministically as possible across platforms. See .
Transform a 3D position and rotation to a 2D . Scale is not part of a therefore it is ignored. If is used, will be used instead which may not provide the correct results.
Transform a 3D position into a 2D position using the selected transform plane. This can also be used for a 3D scale vector as it undergoes the same transformation.
Params:
position — The 3D position to transform.
transformPlane — The transform plane to use.
transformPlaneCustom — The custom transform plane (if required).
Transform a 2D position into a 3D position using the selected transform plane. If is used, will be used instead which may not provide the correct results.
Transform a 2D angle into a 3D rotation using the selected transform plane (Fast). The transformation is fast because the rotation is simplified by the fact that only a single axis of rotation is handled. All other axis rotations are reset to zero. If is used, will be used instead which may not provide the correct results.
Transform a 2D angle into a 3D rotation using the selected transform plane (Slow). The transformation is slower because the rotation is more complex due to the fact that changing a single axis of rotation requires it to not affect any other axis rotations. If is used, will be used instead which may not provide the correct results.
Params:
angle — The 2D angle to transform in radians.
reference — The 3D rotation used as a reference.
transformPlane — The transform plane to use.
Generated by ~/.claude/physicscore2d-api-generator/_generate.py from Unity 6000.5.0b9 UnityEngine.PhysicsCore2DModule.xml. Do not hand-edit; re-run the generator.