A downloadable asset pack

Download NowName your own price

A Construct 3 behavior, that calculates an objects path along a trajectory.

Current Features

  • Set Trajectory By Velocity & Angle
  • Set Trajectory By Target Position, Time
  • Set Trajectory By Target Position & Angle
  • Draw Trajectory Using Sprites
  • Predict Trajectory Collision with Solid
  • Loop over Trajectory Path

For Issues & feature suggestions  report here:
 Issues · armandoalonso/trajectory (github.com)

For source & documentation :
trajectory (github.com)

Download

Download NowName your own price

Click download now to get access to the following files:

piranha305_trajectory-1.1.0.0.c3addon 12 kB
piranha305_trajectory_example.c3p 166 kB

Comments

Log in with itch.io to leave a comment.

This is amazing! Thank you for sharing this amazing behaviour. It works like a charm and it's so simple to use. The only error I've noticed is using Target Trajectory with 'time' values less than 1 (such as 0.65) can cause the object to fall past its target. But that can be easily worked around with the other values.

It's a really great behaviour! Thanks again!

Awesome work! This will be very useful for me. I encountered a bug where the collision prediction is offset when detecting from the left side of a solid object, whereas it doesn't happen on the right side of the object.



I'd also like to suggest an action to "Start Trajectory", which ideally would just initiate an already set trajectory using its existing parameters. I.e.: if a trajectory is set but not "Start Instantly". It'd be easier to use than having to define the arc twice (once for drawing and then again for actually moving).

Similarly it'd be useful to have expressions for the object's last-defined trajectory, like time and steps, target X/Y, velocity, etc.

Hey, ill look into the collision  offset bug, the perdition is based on the steps, what did you have set there so i can try and replicate?  as for the start action I will look into adding an action to start a defined trajectory and also the expressions you mentioned

Thanks for your response! This is using the example file with its default values, 100 steps. I've tried it with any number of steps and the issue seems to be consistent.

Okay cool i think i fixed it, i was always return the left and top of the bounding box, now its returning the midY and midY.

i also added start and stop actions, and expression for fro targetx, targety, velocity, angle, and time

if not target is specified it will return -1 same for time, if not time is specified it will return 1, for velocity and agle, if they are not passed in i calculate them and return that. should upload new version shortly
 

Amazing, thanks for the quick fix and updates!

(+1)

addon & example was updated on itch & github 
trajectory (github.com)

Nice addon with great examples, particularly the expressions and examples that show the projected trajectory.

(1 edit)

Quick FYI - looks like you bundled the addon in the example project, I imagine you did not want to do that (so that later upgraded are not overridden). Also if you click again in the example while the trajectory is in progress, the layout won't restart.

Fixed the bundling issue, and i was not able to recreate the layout restart? It should only restart on the velocity and angle example when it hits a solid?

Can you provide a bit more information so I can pinpoint where u are seeing the issue