Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: SammyJoeUK on December 11, 2016, 01:44:56 PM

Title: Constant Velocity?
Post by: SammyJoeUK on December 11, 2016, 01:44:56 PM
Hi,

First off - I'd like to thank you guys for all the help I received last time with my last question. This is slightly related.

I want to avoid using "Every Frame" for this issue but I'm trying to add a constant "Set Velocity" to this cube object...


Currently I have just "Set Velocity" on the game object which works fine when there isn't a slope or an object blocking the path, however I want to be able to have the object constantly moving.

Please Help! :)

Thanks again! :D
Title: Re: Constant Velocity?
Post by: 600 on December 11, 2016, 01:59:41 PM
Hi, maybe you can use Unity component Constant Force?
Title: Re: Constant Velocity?
Post by: SammyJoeUK on December 11, 2016, 02:01:09 PM
Is that not available as a Playmaker Action?
Title: Re: Constant Velocity?
Post by: 600 on December 11, 2016, 02:03:21 PM
No, it is a component which you can add on game object in Inspector.
Title: Re: Constant Velocity?
Post by: SammyJoeUK on December 11, 2016, 02:42:14 PM
Thanks for that, is there anyway to change them using actions? so say pressing left puts a constant force on one axis and then pressing forward stops that force and puts a constant force on the other axis?
Title: Re: Constant Velocity?
Post by: 600 on December 12, 2016, 03:18:09 AM
I think you can change axis values with Set Property.
Title: Re: Constant Velocity?
Post by: SammyJoeUK on December 13, 2016, 07:12:44 AM
looking through the Set Property after setting the Target Object as the gameobject i want to move - can't find it! :(
Title: Re: Constant Velocity?
Post by: 600 on December 13, 2016, 07:38:38 AM
The target should be that component not game object, click and drag it to FSM it will give you options to Get/Set Property
Title: Re: Constant Velocity?
Post by: SammyJoeUK on December 13, 2016, 07:44:45 AM
ah HA! Thanks friend! :)
Title: Re: Constant Velocity?
Post by: SammyJoeUK on December 13, 2016, 08:13:41 AM
One last thing - is there any way to stop the object speeding up? I need it at a consistant pace rather than speeding up as the object moves along?
Title: Re: Constant Velocity?
Post by: 600 on December 13, 2016, 08:30:41 AM
Oh yeah, then maybe it is not the solution, if you can’t use Set Velocity every frame, maybe worth a look at Move Rigidbody action found on Ecosystem. I am guessing here as I have not tested it.
Title: Re: Constant Velocity?
Post by: dudebxl on December 13, 2016, 11:33:40 AM
has anybody checked ecosystem for SetVelocityConstantSpeed3d / SetVelocityConstantSpeed2d ??

more info here: http://hutonggames.com/playmakerforum/index.php?topic=10600.0
Title: Re: Constant Velocity?
Post by: 600 on December 13, 2016, 11:48:02 AM
has anybody checked ecosystem for SetVelocityConstantSpeed3d / SetVelocityConstantSpeed2d ??

more info here: http://hutonggames.com/playmakerforum/index.php?topic=10600.0
;D
Title: Re: Constant Velocity?
Post by: SammyJoeUK on December 13, 2016, 06:35:55 PM
(http://oi63.tinypic.com/mvj7gx.jpg)

Getting this error with the script in my game now...?
Title: Re: Constant Velocity?
Post by: parallel on December 14, 2016, 10:44:56 AM
EDIT: just saw dudexbls reply next page which is probably the cause, I'll leave my reply in case the updated action doesn't fix the issue.

IMO, this may be an error connected with ecosystem, at least it has popped up with other downloaded assets through ecosystem where the playmaker window suddenly doesn't show up even though its installled, which seems to be the case here? The workaround I'd do is to delete all playmaker related folders and reinstall a fresh, which should not tamper with your scene unless you saved it or its components in those folders.
Title: Re: Constant Velocity?
Post by: dudebxl on December 14, 2016, 11:36:16 AM
@SammyJoeUK

Yeah sorry they are out of date - get the ones in the ecosystem or https://snipt.net/dudebxl/
Title: Re: Constant Velocity?
Post by: SammyJoeUK on December 29, 2016, 06:06:54 AM
Sorry I've kept quiet on this for so long but I'm stuck on adding this custom action to my Playmaker - i've got the script added into my unity playmaker folder... it's in it's own folder "Custom_Actions"

But I've got no idea where to go from there....

(http://oi65.tinypic.com/x59qmg.jpg)

Help?