playMaker

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 - tcmeric

Pages: 1 ... 44 45 [46] 47
676
Playmaker Help / Re: Get Object Rotations Over 360
« on: February 23, 2017, 05:57:23 AM »
Thanks Jean. Ill see what I can figure out.

677
Playmaker Help / How to Set FsmEnum Type in Custom Action?
« on: February 23, 2017, 05:56:31 AM »
Hi,

How can I set the enum type in a custom action?

I can set the enum variable like this:
Quote
public FsmEnum Enum;

But in the playmaker inspector, I get "Enum Type" set to none. I would like to set the type.

Sorry I searched the forums and could not find an answer or an example in the actions in playmaker. Very cool we can use Enum in playmaker. Handy.


678
Action Requests / Re: NewtonVR Integration
« on: February 23, 2017, 03:19:35 AM »
Here is a tutorial by VRTK about how to use the two together:

679
Playmaker Help / Re: Get Object Rotations Over 360
« on: February 23, 2017, 02:08:30 AM »
No problem.

Playmaker says:
Action: Get Rotation (from game object)
Y Rotation = 40

Inspector Says:
Game Object
Actual Y Rotation = 400


The playmaker action get rotation goes from 0 - 360, and then starts again at 0 after passing 360.



I would like to perform some math equations on the actual rotation, so I need to the real actual number in playmaker (400, not 40).

680
Playmaker Help / Re: Support for FsmUshort
« on: February 23, 2017, 01:31:03 AM »
Opps, maybe I sent it to your email by mistake. I sent a PM this time (I think  ;D )

681
Playmaker Help / Re: Support for FsmUshort
« on: February 22, 2017, 09:22:04 PM »
Perfect, thank you for your help. I spent more time reading about implicit and explicit casting. Your solution worked and helped point me in the right direction to learn more!

I sent you a PM regarding the serialized field.

682
Share New Actions / Re: VRTK Actions
« on: February 21, 2017, 07:50:26 PM »
Is there anything in particular that you need? Are you using the latest github version?

Anyways, it will take awhile to get through it, but little by little.  8)

683
Playmaker Help / Re: Get Object Rotations Over 360
« on: February 21, 2017, 05:36:19 AM »
I am going to bump this. Maybe there is no current playmaker actions to address this issue? Or maybe I am just overlooking a math issue that I am not aware of. Thank you.

684
Action Requests / Re: NewtonVR Integration
« on: February 21, 2017, 05:21:21 AM »
So how much cross over is there between VRTK and NewtonVR. Seems alot, no? I dont see anything it offers that VRTK doesnt.

Anyways, I have started to create playmaker actions for VRTK if you are interested. Because the VRTK community is so active, it is a bit of a moving target. Also, it is a HUGE package. I just started this week. Ill keep working at it little by little. (Expect me to annoy the forum with custom action questions, sorry).

Its available on my github for free: https://github.com/dumbgamedev

The 3x version matches the VRTK github version (which should hit the unity asset store in a bit). That is where I will concentrate my efforts.

685
Share New Actions / Re: VRWeapons Actions for SteamVR Weapons
« on: February 21, 2017, 05:15:12 AM »
Oh, and here is the link to the asset. It is top notch. IMHO the best VR weapons package out there at the moment (and the only one with playmaker actions  8) )

https://www.assetstore.unity3d.com/en/#!/content/66387

686
Share New Actions / VRWeapons Actions for SteamVR Weapons
« on: February 21, 2017, 05:13:26 AM »
I have created a set of playmaker actions for the VRweapons asset on the unity store. I am not the creator of this assets package, but I do use it myself. So, I decided to create some actions for it.

You can download it for free here on Github. This works with VRweapons version 1.18. A new version is expected soon. I am working with the asset creator to update the actions to the newest version when it comes out on the unity store. My playmaker actions for the newest version will become available on the unity store (free) and also on github.

Enjoy and please feel free to leave any comments, questions or concerns below.

https://github.com/dumbgamedev/VRweapons_Playmaker

687
Playmaker Help / Re: Support for FsmUshort
« on: February 21, 2017, 04:50:37 AM »
Hi,

Thank you for the reply. I am basically just setting up a custom action which sets playmaker FsmVariables to script variables. It is for the VRweapons package on the asset store that allows quick building of weapons for steam VR. The playmaker actions will be release for free (I am not the author of the asset but have their permission).

In the Weapons.cs script, it is written this way:
Quote
[Range(0, 0.2f)]
public float bulletSpreadRange;
public float kickStrength;
public float rotKickStrength;
public ushort hapticStrength;
etc etc.

My script is basically the template from MdotStrange, which works otherwise. I was hoping I could dump the ushort into a float. I have never done a variable type conversion. I have done some reading up on it, but havent figured it out yet.

Quote

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
   [ActionCategory("VRweapons")]
   [Tooltip("Adjust weapon haptic time per shot in frames for VRweapons script on an object")]

   // the class must match the name of the action
   // if the action is named missleAction then that should be the name of the class
   public class  WeaponHapticAction : FsmStateAction
   {
      [RequiredField]
      // add the name of your script inside of typeof("yourScriptName"))
      [CheckForComponent(typeof(Weapon))]   

      // this is the game object the script is on
      public FsmOwnerDefault gameObject;

      [Tooltip("Adjust weapon haptic time per shot in frames.")]
      // add the variables you want in your action
      public FsmFloat HapticStre;

      // you can usually leave this alone
      public FsmBool everyFrame;

      // you are making a custom variable with the scripts type
      Weapon theScript;

      public override void Reset()
      {
         //its good practice to set your var to null at start
         gameObject = null;
         HapticStre = null;
         everyFrame = false;
      }

      public override void OnEnter()
      {
         var go = Fsm.GetOwnerDefaultTarget(gameObject);

         // you are grabbing the script from the game object and storing it in your custom variable type
         theScript = go.GetComponent<Weapon>();

         if (!everyFrame.Value)
         {
            MakeItSo();
            Finish();
         }

      }

      public override void OnUpdate()
      {
         if (everyFrame.Value)
         {
            MakeItSo();
         }
      }

      //Name your method here
      void MakeItSo()
      {
         var go = Fsm.GetOwnerDefaultTarget(gameObject);
         if (go == null)
         {
            return;
         }

         //Playmaker variable to Script

         theScript.hapticStrength = HapticStre.Value;

         //Note! Playmaker var's need .Value after them or they won't work in some cases


      }

   }
}


Also can I ask, is there any way to get variables from serialized fields from a script into playmaker? I tried the same script above (changed for floats), but i get an error about them being read only.

Script.cs

Quote
   [SerializeField]
   float maxHealth = 100f;
   [SerializeField]
   float currentHealth;

688
Playmaker Help / Re: Custom Action Assistance - Audio Clip
« on: February 20, 2017, 11:53:01 PM »
Thanks, I appreciate the assistance. I think I am going to go back and re-watch some parts of a C# course I am taking first. I am hoping that will help to clarify some things for me. I am fairly new to C#.

Ill post back here later once I have done so.

689
Share New Actions / Re: Google Daydream Actions
« on: February 20, 2017, 10:08:29 PM »
Nice, good job!  8)

690
Share New Actions / VRTK Actions
« on: February 20, 2017, 10:08:01 PM »
I have started creating actions for VRTK. It is a bit of a challenge for me at my skill level, but i am working away at it. Also, VRTK changes pretty fast (on their github). The current store asset version is 3.0.1, and the current github version have some pretty significant changes. The github version will be pushed to the asset store fairly soon Ive been told. So I have now started working on the github version instead of the asset store version.

I have been in touch with the VRTK creator, theStoneFox, and they are pretty hands-off, as they are not familiar with playmaker. Therefore I hope this forum doesn't mind me bothering you all sometimes for custom action help as I come across new problems. Thanks to MdotStrange for getting me started with his template for custom actions.

All that being said, actions are free to download from my github account here: https://github.com/dumbgamedev/

My plan is to work first on pointers, then teleporters/locomotion, followed by input methods. We will see how that goes.

It is a HUGE toolkit, so there potentially could be a TON of actions from it. It likely will change again before I even get to the end. So if people have requests, better post them here, so I can bump them up on my to-do list.

Pages: 1 ... 44 45 [46] 47