Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[RELEASED] SimpleProjectiles - Simple trajectory prediction and targeting!

Discussion in 'Assets and Asset Store' started by Hamzah-Khan, Aug 13, 2015.

  1. Hamzah-Khan

    Hamzah-Khan

    Joined:
    Dec 31, 2012
    Posts:
    59

    Whats new in version 1.1:

    - Fixed a bug
    - Added C# version of scripts

    FEATURES:

    - Real-world physics equations!

    - Unlimited precision - calculate trajectories down to the nanometer if you want to!

    - Impact data - access data for impact points of each trajectory!

    - Exclusive targeting system allows you to input coordinates to the system and return a bearing to fire at the target - a feature rarely seen in typical trajectory systems

    - High trajectories - projectile targeting allows for use of a high trajectory that mimics that action of mortars and howitzers!

    - Customizable trajectory display - display the trajectory using a LineRenderer of your choice.



    SimpleProjectiles is a simple asset that allows you to have control over predicting projectile trajectories and targeting stationary objects.
    SimpleProjectiles is designed to retain simplicity in its design but allow you to customise the complexity of the physics simulation.

    Web Player Demo

    User Manual

    Get it now on the asset store for $9
     
    Last edited: Aug 21, 2015
  2. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    324
    Could you make a webplayer version to test it ?
     
  3. Hamzah-Khan

    Hamzah-Khan

    Joined:
    Dec 31, 2012
    Posts:
    59
    Done :)

    Also uploaded user manual as this had been requested before in a PM
     
  4. Hamzah-Khan

    Hamzah-Khan

    Joined:
    Dec 31, 2012
    Posts:
    59
    To those that have bought this, please contact me should you have any questions or requests to make.

    I'm happy to continue adding free features in updates so long as they are mathematically and physically feasible!
     
  5. Hamzah-Khan

    Hamzah-Khan

    Joined:
    Dec 31, 2012
    Posts:
    59
    Version 1.1 submitted for review! Whats new:
    - C# versions of scripts added
    - Fixed a bug
     
  6. Hamzah-Khan

    Hamzah-Khan

    Joined:
    Dec 31, 2012
    Posts:
    59
    Version 1.1 is now live! Read above post for new features
     
  7. Barachiel

    Barachiel

    Joined:
    Nov 25, 2012
    Posts:
    147
    This looks quite interesting.
    I was going to ask a few questions about it, but the manual is short and concise and already answered what I wanted to know, so good job on that.
    Seems like a nice asset and, while I have no need for it at the moment, I'll keep it on my wishlist for when I do. =)
     
  8. Santolin

    Santolin

    Joined:
    Jul 13, 2012
    Posts:
    3
    Really nice :)

    Unfortunately the demo doesn't load for me (I think there's something wrong with my webplayer), so there's something I'm interested in I can't test out.

    In regards to using a 'high trajectory', can it be done so you set up a target location and a max height and it calculates the appropriate angle and velocity? More or less how it works in Portal 2:

     
  9. Hamzah-Khan

    Hamzah-Khan

    Joined:
    Dec 31, 2012
    Posts:
    59
    Very sorry for the late reply, Santolin, I've been very busy over the past month or so IRL.
    With regards to your question, I'm afraid the answer is no, not out of the box. This tool is a trajectory predictor and a projectile tracker, taking only two inputs which are velocity and/or target coordinates. The rest is calculated by the laws of physics. In order to specify a max height, this would require the tool outputting a velocity, which it doesn't do.
    To achieve the result that you want, you would need to calculate what max velocity would reach a maximum height and use that as your input velocity.

    Example:
    v² = u² + 2×a×s, where:
    v = 0
    u = maximum velocity
    a = -9.81
    s = maximum height

    By using this velocity always you will ensure that you never exceed the maximum height.
     
  10. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    I am making a game where I stand behind a counter, and try to fling food into customers' mouths. The customers are standing in front of the counter.

    I want to use my finger like this:

    1. Slide back to increase velocity/arc to adjust the vertical. If I slide back to much the point of contact may be on the customer's forehead. If I don't slide back enough the point of contact may be on the customer's chest.
    If I slide back just enough the point of contact will be the customer's mouth.

    2. Slide left/right to set horizontal angle. Slide too far left or right and I may hit the customer's cheeks, or altogether miss the customer's head, or even hit the wrong customer standing to the left or right of the target customer.

    P.S. running your Unity webplayer off of google drive doesn't work. Every browser asks to install webplayer. but it is already installed and the webplayer plays when accessing every other site except for yours. Please fix it or use WebGL.
     
    Last edited: Nov 6, 2015