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.

Topics - Rbanninga

Pages: [1]
Playmaker Help / Changed vs Update ever Frame Optimization discussion
« on: November 09, 2015, 07:00:10 AM »
So I was wondering about the update every frame toggle on the various actions... And it made me think about ways to optimize needless calculations where ever possible.

Correct me if I am wrong but does it make sense to add a state in my FSM that would sit idle and only trigger to do math equations if the data has changed?

Currently I have things update every frame but there could be moments where those numbers just sit idle and don't need to be updated. So the Float_Changed, Int and other variations of the Change check could be used for exactly that type of optimization correct to reduce pointless calculations?


Playmaker Help / Switching characters?
« on: October 19, 2013, 01:58:44 AM »
Hello everyone,

I have a question regarding switching the character you control during gameplay. How would I go about switching to another player for example in a team game like soccer? So I am playing one character and then I pass the ball to another player and assume control of the character that currently has the ball. Another example would be a puzzle game where I control more then one character and at any point in time I would like to switch between one or the other character. Is this possible and if so could somebody point me in the right direction? I must have missed some state switch controller or something.

Thanks and hopefully this does not come across as to noobish of a question... :)

Playmaker Help / Dynamic Target?
« on: October 15, 2013, 08:06:54 AM »
Hello everyone,

I have a question in regards to targets or elements that could change dynamically. Currently a node like the Move to action requires that I set a specific object inside unity itself. But I would like this to be done from maybe a possible list or which ever entity I find inside that radius meeting some specific criteria like distance or low health as an example.

I've found an object variable in the engine... would that have something to do with it possible?

Regards and thanks!

Good day everyone,

I've just started getting into Playmakers and it has been a great so far. I've run into a snag though which I am sure is super simple but somehow eludes me with how to transfer the logic into Playmaker. How can I calculate the speed of an object with and without rigid body?

I've tried Get Speed on an object with a rigid body. I then saved the value into a float and converted it into a string so I could output it to the GUI. At first it would display a number that was constantly increasing in value... regardless of me moving the object around in-game. I then went and disabled gravity on the object inside the rigid body component and then I stopped getting any value except 0.0 even when moving. So that is one question... what am I doing wrong...

And then the second approach I would like to attempt is one that does not need to trigger the physics system of Unity at all. I would like to compare the distance of an object in relation to its previous location every frame. I've read that its one good way to go about it.

Below is a piece of code I found that should do the trick I think. But I am wondering how best to transfer that into a playmaker FSM using the math functions.

float speed = (transform.position - this.mLastPosition).magnitude / elapsedTime;
this.mLastPosition = transform.position;

Now if I read this right it takes one position and subtracts it from a previous one? But how can you specify that each one is either the first or second frame? What is a good way to capture the magnitude and then divide it by time that has passed?

Apologies is this comes across as pure gibberish. Your help would be most appreciated. THANKS!

Pages: [1]