Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Mupp

Pages: 1 [2] 3 4 5
Action Requests / Re: Negative ABS
« on: December 04, 2019, 07:38:10 AM »
I actually did a search for ABS and negative but I found nothing. It's really easy to not find what you are looking for unless you type it exactly so I missed it. Thanks.

PlayMaker Help / Re: Angled movement xy coords.
« on: December 03, 2019, 08:07:26 AM »
I must be stupid or something because every time I try to do that the movement becomes messed up. You are talking about the normalize vector action right?

Do you mind giving a step by step explanation how to get a normalized direction to put into TransformDirection?

Action Requests / Negative ABS
« on: December 03, 2019, 07:22:55 AM »
No really required but it would be nice to have a checkbox in the ABS actions to set the value to negative. Saves the work of adding one whole extra action to the state.  ;D

And having the option to choose which variable to save the result in would be nice.

Ok, I see. Thanks.


 I am trying to make sense of what you are trying to achieve, but I am not sure really. why not using simple Colliders to prevent players passing through walls and using simple collision detection to be aware of when a player touches a wall?

Because from trying to do it like that I have gotten horrible results. Collision is extremely inconsistent, sometimes it takes several frames to block and push you out of the wall.
An other example is how you can get different collisions depending on which side you hit. On one side you might clip into the wall and if you jump up you might land on the top of the collider even if you should be to the side of it. Sometimes you might slide along a collider and just randomly get stuck.
All this seems to happen differently depending on your current frame rate, or change if you restart the editor or which day it might be. Maybe the weather too...
I'm using 5.6 so it's perhaps better in newer version but with my method I'm at least in full control of the objects positions at all times.

But that is not what this thread is about. I just wanted to know how I can make FSMs run in a certain order.

PlayMaker Help / Re: Angled movement xy coords.
« on: December 02, 2019, 12:27:58 PM »
Hmm, I don't think that's right, diagonal movement looks too fast. Also, in your link it says that it does not take scale into account and that you should use TranformPoint for that. So I tried that and it would just launch the object in an insane speed. So I don't know what else to do.

PlayMaker Help / Angled movement xy coords.
« on: November 29, 2019, 05:47:14 PM »
I move an object along XY coords. by offsetting its current position with a speed value. Speed=distance moved per frame to make it easy. There is one speed value for X axis and one for Y but they are both capped to the same value. This value starts at 0 and accelerates until it reaches max speed over a couple of frames. So the current speed value can be anything between negative max to positive max depending which direction it moves.

Now, where should the object be placed if both axis speed values are non 0? The object should never be able to move further than its max speed if it moved straight along one axis, the magnitude basically.
The magnitude should also scale depending on how far along the acceleration has come, for each axis separately, not assuming that it's always at max speed. For example, the acceleration may be at 90% of max speed along the X axis and only at 45% for Y.
Hope this makes sense.  :o

How can I get the XY coords. of this point?


 short answer: you can't :)

I would tend to think they are executed in order in the component stack, but I would not bet on that at all.

Thanks, it's always good to know what's going on under the hood.

I tried RaycastAdvanced, but it doesn't work at all. It does not even shoot a ray so I could not test it.

I also tried to change SetPosition to late update for the wall check, but that didn't do anything. I even tried to disable the collision FSM and only ran it when the movement FSM was done withe its loop, but that didn't change anything either.

I mean I can fix this by disabling movement when you hit a wall, but I really want to know what's actually happening.

I have 2 FSMs on the same object. One moves the object with SetPosition when I press buttons. The other shoots Raycasts to check if the object hits walls. If it hits, it moves the object so it no longer clips the wall. It also uses SetPosition. This is set to happen once every frame for both FSMs.

So what happens if the object hits a wall and I keep pressing the button, which of the 2 FSMs have priority? Both, apparently..?

What happens is the object stops moving at the wall but it still clips into it the same distance it should have moved that frame. When I release the button, the object moves so it no longer is clipping.
So it looks like both FSMs happens but shouldn't the one with the Raycasts happen later since Raycasts takes longer to do and overwrite the position from first FSM? Changing the order of the FSMs components on the object does nothing.

So I wonder what can I do to make sure one FSM has priority over an other?

PlayMaker Help / Re: Get FSM variables locked to 1 FSM during runtime
« on: January 23, 2019, 02:41:04 PM »
There we go, now everything works. Thanks a lot man.

PlayMaker Help / Re: Get FSM variables locked to 1 FSM during runtime
« on: January 23, 2019, 10:19:39 AM »
Thanks a lot, those I have tested works as they should now. Great.

The pack did not include the Get FSM Variables action so I have to replace that, unless there is something I can do?

PlayMaker Help / Re: Get FSM variables locked to 1 FSM during runtime
« on: January 23, 2019, 09:28:10 AM »
1.8.5 Havn't upgraded for a year or so.

PlayMaker Help / Re: Get FSM variables locked to 1 FSM during runtime
« on: January 23, 2019, 06:44:42 AM »
I tried these but I get 2 errors.

Assets/PlayMaker/Actions/StateMachine/BaseGameObjectFsmAction.cs(12,10): error CS0246: The type or namespace name `DisplayOrder' could not be found. Are you missing an assembly reference?

Assets/PlayMaker/Actions/StateMachine/BaseGameObjectFsmAction.cs(16,10): error CS0246: The type or namespace name `DisplayOrder' could not be found. Are you missing an assembly reference?

I fiddled a bit with the code and disabled those 2 lines and now it seems to work. Some things are working but I'm using Get FSM Variables which was not in the pack, so that's not working.
I guess I might gotten it from eco so I have to replace that unless there is something I can do with the code?

PlayMaker Help / Re: Get FSM variables locked to 1 FSM during runtime
« on: January 22, 2019, 01:03:46 PM »
Great, sounds good.

PlayMaker Help / Re: Get FSM variables locked to 1 FSM during runtime
« on: January 22, 2019, 12:22:10 PM »
Here is an image. In every state I get a variable from the stage FSM I use the StageNr variable as the name. It gets assigned the correct name every time so there is no problem there.

I've tried changing the name manually to different stage names and it works, the first time, so it gets data correctly. I even tried with a non existing name and got warnings that those variables doesn't exist as expected.

Here is what's strange though. If I do a stage trigger and then remove the StageNr variable and do a new stage trigger, you would expect it would look for a non existing FSM, but it doesn't. It gives no warnings and it does a normal stage transition, but of course to the same stage.

This makes me almost 100% certain the FSM name gets locked after the first time the Get FSM X is run.

Pages: 1 [2] 3 4 5