Skip to content

A projectile control and projectile movement(transform) for unity engine powered games

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

kaiyumcg/UTProjectile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Projectile control and movement scripts for unity powered games. Currently only transform based movement is supported. Uses DOTS for snapping features.

Installation:

Install Burst and Job from package manager. Copy the “ProjectileMovement” folder inside your unity project.

Usage:

    [SerializeField] ProjectileControl control;
    [SerializeField] Transform ballPrefab;
    [SerializeField] float speed = 20f;
    // Update is called once per frame
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            control.StartPlayerInput((points) =>
            {
                var ball = Instantiate(ballPrefab) as Transform;
                control.TravelAlongProjectilePath(ball, speed, points,       isLooping : false, () =>
                {
                    Debug.Log("Reached");
                });
            });
        }
    }

This will start the control script as well as show projectile in line renderer or in a custom way. At the release of control(when mouse button/touch is up), a prefab will move along the trajectory. Configure the “ProjectileControl” component in the inspector to your liking.

Check the ext.cs file for some handy extension methods as well.

About

A projectile control and projectile movement(transform) for unity engine powered games

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages