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.


Topics - LordHorusNL

Pages: [1]
1
Action Requests / Quaternion get Angle/Axis [SOLVED]
« on: November 09, 2017, 11:54:06 AM »
I'd like to request a action that gets the angle and axis from a Quaternion using Quaternion.ToAngleAxis

Something like this only with a Quaternion as input and everyframe/updatetype.

"transform.rotation.ToAngleAxis(out angle, out axis);"

My own attempts at this action did not pan out ;D

2
Action Requests / Photon Network Get Time/Timestamps[SOLVED]
« on: October 24, 2017, 11:43:04 AM »
I need a action for the photon package to get the server time or more precisely the timestamps

Also would a action that gets the TimeSinceLastTick be possible.

Does something like this exist yet?

3
Hey guys, i'm working on a "Slider-Crank" mechanism and having some trouble.

I move the "Back Arm" and the entire setup moves with it, however i cant seem to get the "Front Arm" to rotate as if it had two fixed points of rotation "Points a/b"

Both arms rotate offcourse and the carriage move on the z axis only.

So basically i need a rotation between two objects. I tried every action i could think of but nothing gives a perfect result.



Any ideas?

4
Playmaker Help / Framerate Independent Projectile Movement? [SOLVED]
« on: September 16, 2017, 04:55:34 PM »
Hey guys i've got a projectile with a rigidbody that i'm propelling with AddForce and i need the movement to be independent of the framerate.

I know AddForce runs in FixedUpdate, however i'm not setting the force every frame because that seems to cause acceleration and i need my projectile to fly at a constant speed (80 meters per second)

How can i achieve this?


5
Playmaker Help / Find Child VS Get Child? [SOLVED]
« on: September 15, 2017, 08:48:34 AM »
Hey guys i was just wondering if there was any real performance difference between the "Find Child" and "Get Child" actions?

I'm changing up my naming conventions and was wondering if i could switch to "Find Child" without seeing a drop in performance.

6
Action Requests / Get Parent Multiple? Get parent of parent etc [SOLVED]
« on: September 11, 2017, 04:14:36 PM »
I would like to request a "Get Parent" action that allows me to not only get the parent of my game object but also allows me to define how far up the hierarchy chain i want to pick a parent. Get parent three times removed or something.

I have a game object that needs to be parented and unparented a lot and i want to be able to always choose the third parent up as my root object, without having to use 3 or more "Get Parent" actions. "Get Root" is useless in this situation.

Something like this:

Game Object  : Use Owner
Parent Level   : 3
Parent Object : -(Result)-

If that makes sense.

7
Playmaker Help / Int Switch To Object Action [SOLVED]
« on: July 20, 2017, 02:41:23 PM »
Hey guys, i find myself in need of a script to compare an array index to about 10 other ints(options) and if i get a match set an object value to the object value specified on each of the 10 ints and then fire off a finish event.

I've gotten this far by just modifying a Int Switch, but no further :o

Could anybody give me some hints on how to actually set the object value in this script.

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Logic)]
[Tooltip("Sends an Event based on the value of an Integer Variable.")]
public class IntSwitchToObject : FsmStateAction
{
[RequiredField]
[UIHint(UIHint.Variable)]
public FsmInt intVariable;
public FsmObject objectVariable;
[CompoundArray("Int Switches", "Compare Int", "Set Object")]
public FsmInt[] compareTo;
public FsmObject[] objectValue;
public bool everyFrame;

public override void Reset()
{
intVariable = null;
objectValue = null;
compareTo = new FsmInt[1];
objectVariable = null;
everyFrame = false;
}

public override void OnEnter()
{
DoIntSwitch();

if (!everyFrame)
Finish();
}

public override void OnUpdate()
{
DoIntSwitch();
}

void DoIntSwitch()
{
if (intVariable.IsNone)
return;

for (int i = 0; i < compareTo.Length; i++)
{
if (intVariable.Value == compareTo[i].Value)
{
//objectVariable.Value = objectValue.Value;
return;
}
}
}
}
}

I could offcourse just use a Int Switch with 10 transitions, but that would be a lot of extra states.

8
Playmaker Help / Tracking multiple objects within a FOV
« on: July 08, 2017, 08:18:26 AM »
Hey guys, so i'm workig on a AI system for my game and i'm trying to figure out the best way to check if other NPC's are within a certain field of view.

Tracking one object is simple offcourse, however i need to check the angle/visibility of multiple objects from an array list to see if they move in/out of the FOV.

This array list is populated with objects that are in close proximity to the NPC doing the checking, so this list changes depending on the objects in range.

So i never know how many items are in the array at any given time.

Any ideas on how to best approach this?

9
Playmaker Help / Get Action Event?[SOLVED]
« on: June 24, 2017, 07:49:14 AM »
Hey guys, is it currently possible to find out which specific action in a state was the one that triggered a transition event?

I have one state that checks if a whole list of variables has changed and if any of them change i want to fire off the FINISHED event, however in the next state i need to know which specific action triggered the event so that i can know which variable i need to change.

So that when i'm checking 50 variables in one state, i don't also need 50 different transitions :P

10
Playmaker Help / Bullet transform position
« on: March 18, 2017, 05:29:59 PM »
Hey guys, i'm trying to recreate this code in playmaker.

I want to fire a bullet and use raycast to register any impact. I store an old position and a new position every frame. The old position is the current position of the bullet and the new position is the position it would reach if the raycast doesn't hit anything.

Quote
Bullet {
    Update {
        newPos += speed * transform.forward * Time.deltaTime;

        direction = newPos - oldPos;
        distance = direction.magnitude;

        if (Raycast(oldPos, direction, distance)) {
            Destroy(gameObject);
        }
        else {
            oldPos = transform.position;
            transform.position = newPos;
        }
    }
}

This is what i have, minus the raycast. I just need to get the bullet working right.
I've already got the distance working.

Speed "Float" == 300 (or any speed)

Get Position == oldPos
------------------------------------------------------------------------------
Get Time Info == time.deltaTime
Float Operator == Speed, time.deltaTime, Multiply = newPos
------------------------------------------------------------------------------
Translate == set to newPos

Math is not really my thing so anybody see the obvious mistakes i'm making?


11
VR Help / Grabbing object in VR and velocity?
« on: January 10, 2017, 12:34:47 PM »
Hey guys i'm working on a pickup/interaction system for VR that allows you to pickup and throw objects, this works great when stationary.

However when the camerarig is moving and i drop the object, it does not fall straight down, but falls back from where the player is comming. So it does not take the camerarig velocity into consideration.

I have this and it works great:

Get controller position and velocity
Set parent
Use gravity
Set rigid body constraints
Set velocity
Set angular velocity

Can anybody tell me how i would get the object to fall straight down when moving?

12
VR Help / HTC Vive Gun slide
« on: November 10, 2016, 02:28:43 PM »
Hey guys, i'm trying to make a two handed gun with playmaker similar to onward/H3ver. But i can't seem to figure out how to move the slide/bolt with the controller.

Does anybody have any tips or suggestion on how i could achieve this?

I already have a barebone two handed setup, using the bow template from Sebaslive's toolkit.

Pages: [1]