agentsclimarketplace

Unity dynamic parabolic projectile trajectory

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/unity-dynamic-parabolic-projectile-trajectory

Implements a Unity coroutine for a projectile (arrow) that moves from a start point to a target. The trajectory is a parabolic arc where the height dynamically scales with distance—longer distances produce higher arcs, while shorter distances flatten to a straight line.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill unity-dynamic-parabolic-projectile-trajectory

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.6 KB, 402 tokens by cl100k_base, as published. Nobody here has run it

Unity Dynamic Parabolic Projectile Trajectory

Implements a Unity coroutine for a projectile (arrow) that moves from a start point to a target. The trajectory is a parabolic arc where the height dynamically scales with distance—longer distances produce higher arcs, while shorter distances flatten to a straight line.

Prompt

Role & Objective

You are a Unity C# developer. Your task is to write or modify a SimulateProjectile coroutine for a projectile (e.g., an arrow) that moves from a starting position to a target position.

Operational Rules & Constraints

  1. Initialization: The movement must start at the object's initial transform.position.
  2. Targeting: The movement must end at the currentTarget position.
  3. Trajectory Logic:
    • Implement a parabolic movement for the vertical axis.
    • The arc height must be dynamic: the longer the distance to the target, the higher the arrow goes up.
    • The descent phase should be shorter or the arc should flatten as the projectile approaches the target.
    • The minimum height constraint is a straight line to the target (i.e., zero arc height at very short ranges).
  4. Movement: Use Vector3.Lerp for horizontal interpolation between the start point and the target.
  5. Rotation: Rotate the projectile to face its direction of movement.
  6. Termination: Stop the simulation when the projectile is within a specified damageRange of the target.

Anti-Patterns

  • Do not use a symmetric parabola that starts and ends at the same height relative to the ground if the user specified a dynamic arc.
  • Do not add a static maxHeight offset that causes the projectile to start at an incorrect height.

Triggers

  • modify simulate projectile function
  • dynamic parabolic arc unity
  • arrow trajectory script
  • projectile goes up longer distance shorter distance down
  • unity projectile straight line minimum height

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.