Playmaker Forum

PlayMaker News => General Discussion => Topic started by: braincase on January 12, 2019, 04:08:29 AM

Title: I wrote a Bezier Quadratic Move Action. If you need, get this.
Post by: braincase on January 12, 2019, 04:08:29 AM
I wrote a bezier curve movement Action.
The math solution is from Wikipedia on 'bezier curve' section.

Basically I made this action for a 'Granade launcher' of my game. I used 'slerp' movement but I think Bezier quadratic is better than slerp.

this is very easy to use.
assign start, target, traveler(arrow, ball..etc.) gameobjects.

-auto handle mode
Curvature handle will automatically be between start position and target position.
you can adjust the handle's height to manage the curvature.

-custom handle mode
Assign a gameobject for custom handle.

-randomize curve option.

-rotate along the curve option.

-you can Debug curve line on editor.


hope this can make some people happy.
Let me know if you have some good idea for improving the action.(better optimization...option...anything.)

Thank you for reading this.

/edited/
-Added 'Prevent Too Narrow' option.
When shooter and target is very close, the bezier curve can be extremely narrow.
So the projectile's movement can be very strange. This option modifies bezier curve automatically.(lower the height of curve)

-optimized a little bit. Reduced some calculation during onUpdate().
Title: Re: I wrote a Bezier Quadratic Move Action. If you need, get this.
Post by: heavygunner on January 12, 2019, 12:02:01 PM
I am searching whole Youtube for this.
Thank you buddy :)

Downloading ;)
Title: Re: I wrote a Bezier Quadratic Move Action. If you need, get this.
Post by: craigz on January 17, 2019, 01:41:01 PM
This looks awesome, I'm excited to try it out, thank you for sharing :D