Recent Posts

Pages: 1 [2] 3 4 ... 10
General Discussion / i am new!
« Last post by notto1122 on May 23, 2022, 04:04:49 AM »
hello everyone my name Not. I am new and dont know about this web if you have good suggestion you, i will be happy to know it
thank you in advance

PlayMaker Help / Re: Detect if a key is still pressed?
« Last post by djaydino on May 22, 2022, 09:23:00 PM »
You can also use a Get Key and a Bool Test
PlayMaker Help / Re: Detect if a key is still pressed?
« Last post by NewbNinja on May 22, 2022, 07:21:27 PM »
Maybe this helps:

PlayMaker Help / Re: Detect if a key is still pressed?
« Last post by NewbNinja on May 22, 2022, 06:58:24 PM »
So I actually found it myself through playing around.   I fixed this by creating 2 FSMs on the same object.

Check the key press UP / DOWN

If UP / DOWN -> set variable isFiring to TRUE/FALSE  in FSM2

Start firing if isFiring == TRUE
Stop firing is isFiring == FALSE

I hope this helps someone ... this had my head in bits for at least 4-5 hours!

PlayMaker Help / Detect if a key is still pressed?
« Last post by NewbNinja on May 22, 2022, 06:33:21 PM »
Hey guys,

I'm pretty new to playmaker I'll admit it but Ive spent days looking for a way to detect if a key is still pressed.   I don't mean Get Key Up / Get Key Down because these only check the initial press/release .... this is what I'm trying to do.

I want my weapon to fire when pressed but continue firing until I release the mouse button.

I'm using the following format:

Get Key Down ->  Mouse0 / Fire1 -> if pressed then SHOOT

Spawn emitter, fire once -> FINISHED -> return to WAIT FOR KEY PRESS

However, I want the emitter to keep firing every 1 second until the key is released.   I can't run a while loop or something like that can I?   If so, how do I do that?

Any ideas please people?   This is driving me insane.  I can code this but I started using playmaker and surely there's a function built in that Im overlooking that does a simple while(keyPressed) { FIRE, WAIT 1 SEC }    ?

Many Thanks!
PlayMaker Help / Re: Smooth Limit Rigidbody Distance
« Last post by Twood on May 22, 2022, 01:26:39 PM »
Personally, because I couldn't write a thesis on how to program physics, I would take a simple approach to avoid bugs.  ;D

Just something like for the dragged object, you could track the absolute distance it has moved since dragging started. If it goes over the dragging limit, then disable the drag action for a moment (so you're not fighting.) Then disable physics and just tween it back towards the original position in a way that's smooth. Something like that. For something more complex with dragging stuff around I'd probably see if there's anything on the asset store.
PlayMaker Help / Smooth Limit Rigidbody Distance
« Last post by acornbringer on May 22, 2022, 09:24:50 AM »

I'm using the DragRigidBody PlayMaker action for a bunch of mouse drag interactions in my current project but I'm having trouble thinking of a way to limit how far the player can drag certain objects from there original position.

I've tried using joints to limit the distance but found that they interfere with the rigid body when released since I'm controlling its position in that state. This also causes visual hitches since the rigid body is animating at the same time the joint is pulling it back.

What I would like to achieve is something similar to the Unity Scroll Rect which sets a soft/elastic limit on how far it can be scrolled. With that idea in mind, I tried getting the distance of my rigid body and increasing the spring value as it got further away to slow it down. This seems to have some effect but with a couple drawbacks: First of all, the object becomes immobile at its limit where it should be able to freely move around within the limits. Secondly, I'm stumped on how to go about detecting if the player begins dragging back towards the origin. In this situation, the spring should go back to normal rather than slowly decrease along with the distance. It's feeling more like the object gets stuck in molasses rather than is tied to a soft limit.

If anyone has a suggestion on how I can calculate this kind of thing, it would be greatly appreciated :)
PlayMaker Help / Re: Set Velocity not working
« Last post by thunder on May 21, 2022, 05:53:52 PM »
Thank you, thats a good solution indeed, now I just wanted to understand why my actions didnt work, this is confusing because, as I said, it works fine outside of playmaker.

UPDATE: actually it will break after some add force (like 10000 per frame) in code, but still it will last longer to break in comparison to playmaker. Anyways I guess the solution is to not keep adding force and setting velocity together, as it is said in unity docs to not mess with velocity directly by "set velocity".
PlayMaker Help / Re: Set Velocity not working
« Last post by Twood on May 21, 2022, 03:03:55 PM »
At any rate if you wanted to do it all in PM you might just do it so you check the top speed and stop adding force when it's at top speed.

In this example my add force is 20 but the object never moves faster than 1 because that's where I limited it.

PlayMaker Help / Re: Set Velocity not working
« Last post by thunder on May 21, 2022, 10:46:23 AM »
I understand, and yes I have checked the "every frame" on my add force action because its a rigidbody controller so I need to add force every frame where the player is pressing WASD and then I limit the speed to a maximum speed allowed for the object. If Im breaking playmaker by using that combination then thats unnaceptable, because I can do the same thing using C# or Bolt and it works just fine.
Pages: 1 [2] 3 4 ... 10