Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: Digitom on February 25, 2020, 02:15:41 PM

Title: Get Rigidbody Projectile Trajectory Prediction Points. Line Renderer Positions
Post by: Digitom on February 25, 2020, 02:15:41 PM
Hello,

I made a custom action to predict rigidbody projectiles into a Vector3 FSMArray.
Also made a custom action to set line renderer points based on a vector3 FSMArray.

Useful for angry bird type games or previewing grenade throws and stuff like that. Feel free to add this to the ecosystem!

(https://i.imgur.com/Yqv2EA2.png)
(https://i.imgur.com/7PtYIUG.png)
Title: Re: Get Rigidbody Projectile Trajectory Prediction Points. Line Renderer Positions
Post by: cel on February 26, 2020, 03:32:41 AM
this look awesome... I'll be away from my computer for a few days, so can't test it right now, but will this be able to work in a pool game? Like detect where the white ball will go? and also would it work with ramps (i was thinking of golf games) ?

Any way looks super!!
Title: Re: Get Rigidbody Projectile Trajectory Prediction Points. Line Renderer Positions
Post by: jeanfabre on February 26, 2020, 07:55:08 AM
Nice!
Title: Re: Get Rigidbody Projectile Trajectory Prediction Points. Line Renderer Positions
Post by: Digitom on February 26, 2020, 08:51:52 AM
this look awesome... I'll be away from my computer for a few days, so can't test it right now, but will this be able to work in a pool game? Like detect where the white ball will go? and also would it work with ramps (i was thinking of golf games) ?

Any way looks super!!

It won't detect deflections/bounces atm...or resistance of surfaces...I mayyyy add that but it introduces more room for error.
Title: Re: Get Rigidbody Projectile Trajectory Prediction Points. Line Renderer Positions
Post by: djaydino on February 26, 2020, 09:19:04 AM
Hi.
Nice action.

At this moment i am actually trying something reversed.

Having a certain target point and set its velocity or force to reach that point (with a curve)

i will definitely have a look into the action :)
Title: Re: Get Rigidbody Projectile Trajectory Prediction Points. Line Renderer Positions
Post by: cel on February 26, 2020, 11:03:54 AM
Quote
It won't detect deflections/bounces atm...or resistance of surfaces...I mayyyy add that but it introduces more room for error.

Oh, pity... I've tried the physics scene approach to simulate trajectories (collisions included) but can't wrap my head around it... maybe you could consider having a look at this,. Keep up the good work
Title: Re: Get Rigidbody Projectile Trajectory Prediction Points. Line Renderer Positions
Post by: jeanfabre on February 28, 2020, 01:05:00 AM
Hi,

 check out PhysicsShoot custom action, it's very likely possible to reverse the math so that based on a position and angle of shooting, you deduce the velocity required for the projectile to hit that point.

Bye,

 Jean
Title: Re: Get Rigidbody Projectile Trajectory Prediction Points. Line Renderer Positions
Post by: pixelmator on November 22, 2021, 02:42:29 PM
Does anyone have a scene/example because I'm having trouble getting this action to work. So most likely I'm not understanding this properly. Any help is appreciated.