playMaker

Author Topic: Mouse Wheel Control  (Read 1905 times)

licarell

  • Playmaker Newbie
  • *
  • Posts: 3
Mouse Wheel Control
« on: May 13, 2014, 11:15:47 AM »
Hi Jean, I'm here as you requested about the mouse wheel control of a blend tree.

Thank you so much for your help on this.

Eventually I would like to extend this further, that the player would have to adjust the mouse wheel to match a random value set for the blend tree. Once the value is met it would stay there for a predetermined amount of time then the value would randomly reset and the player would need to adjust the mouse wheel to find that sweetspot again. (As an added bonus I would like to trigger an animation layer, when the sweetspot is met to let the player know they are there.)

An example would be a long distance runner, you could adjust the speed to match a sweetspot where the runners speed would not ware him out and save some strength for the finish.

Above describes a core part of my game other than my example.

Jean I really want to get into this and learn how all this works, but we have a saying in America that "Sometimes your eyes are bigger that your stomach".

I know I don't have the skillset (right now) to pull this off, I don't want you to end up holding my hand through this, just pointing me in the right direction with what nodes I can use to help me with the different functions would be a huge help.

I don't want you to feel taken advantage of and I do respect your time and hope I don't take too much of it.

Thanks again,

Lic

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse Wheel Control
« Reply #1 on: May 14, 2014, 12:36:46 AM »
Hi,

 I think you are getting confused with several concepts.

the speed of an animation is NOT the same as blending two animation together.

Can you refine your query so that I know if we are on the same thing?

Bye,

 Jean

licarell

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Mouse Wheel Control
« Reply #2 on: May 14, 2014, 10:22:53 AM »
Sorry Jean, I meant to say using the mouse wheel to control the blend tree transition slider, to control the transition of procedural motions within Mechanim.

My core concept is to have a target value (For the Blend Tree) that is random, so the player has to slowly adjust with his mouse wheel to reach that target value.

Once that target value is reached it would trigger an animation layer to let the player know it has been reached.

Again after a time (possibly random as well) the target value would reset and the player would need to adjust the mouse wheel to find the target value.

Eventually after enough time at the target value the player would reach a "success" which would trigger the success animation or advancement to another stage.

Jean, I would like to know how you would go about doing this, and what would be "best practice" for something like this.


Sorry for the crappy terminology...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse Wheel Control
« Reply #3 on: May 15, 2014, 12:35:58 AM »
Hi,

 you need to cut down the problem in two:

1: control a float value ranging from 0 to 1 with the mousewheel, so that as you scroll is keeps up and down the values changes.

2: control your blend value. to do this, you can simply manually change the playmaker float variable to see the effect on the animator tree.

That's always a good idea to not try to build everything at the same time, cause you don't know what's not performing as expected, and so cutting down like the above will make the process less frustrating ( with a greater feeling of achievments and moving forward :) )

so, try to tackle point number 1 first, once you have that sorted, we'll move to point number 2.

-- store your mousehweel input in a float
-- have a float variable called "blend" or something
-- add to blend the mouseWheel
-- Clamp blend between 0 and 1

that's about it. Tell me if you can achieve this, and we'll take it from there.

bye,

 Jean

licarell

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Mouse Wheel Control
« Reply #4 on: May 15, 2014, 02:08:35 PM »
This is exactly what I wanted and thank you Jean, I will let you know when I am ready!