playMaker

Author Topic: Restriction on drag axis  (Read 2407 times)

frozze

  • Playmaker Newbie
  • *
  • Posts: 25
Restriction on drag axis
« on: August 10, 2014, 06:50:46 AM »
Hi.

I'm using finger gestures to drag a box. I can drag it everywhere on the screen. But what if i only want to drag it on the Y-axis? Can this be done with a playmaker action or something else?

Thanks

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Restriction on drag axis
« Reply #1 on: August 11, 2014, 10:55:40 AM »
How do you have the drag setup? If you're injecting a vector3 position then just null the Z and X so only the Y comes through.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

frozze

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Restriction on drag axis
« Reply #2 on: August 11, 2014, 11:49:31 AM »
How do you have the drag setup? If you're injecting a vector3 position then just null the Z and X so only the Y comes through.

Hi Lane.

Thanks for your reply. I've attached my setup. I think it's vector 2, but I'm not sure.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Restriction on drag axis
« Reply #3 on: August 11, 2014, 11:57:00 AM »
Ah okay, so you're using an addon that doesn't expose the vector.

Hmm, well I don't know how elaborate it lets you control the drags since I haven't used Finger Gestures myself. My first thought if you're dragging game objects would be to get the position at the start of the drag (a vector3) and then try Set Position on the dragged object with the original vector every frame but only inject the axi that you want to freeze, leaving the other as null and letting FingerGestures have that axis to its control.

Might get artifacts this way, but its worth messing with if there isn't an option inside the addon to do it.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

frozze

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Restriction on drag axis
« Reply #4 on: August 11, 2014, 05:11:18 PM »
Ah okay, so you're using an addon that doesn't expose the vector.

Hmm, well I don't know how elaborate it lets you control the drags since I haven't used Finger Gestures myself. My first thought if you're dragging game objects would be to get the position at the start of the drag (a vector3) and then try Set Position on the dragged object with the original vector every frame but only inject the axi that you want to freeze, leaving the other as null and letting FingerGestures have that axis to its control.

Might get artifacts this way, but its worth messing with if there isn't an option inside the addon to do it.

Might be a stupid question, but how do you set it to null?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Restriction on drag axis
« Reply #5 on: August 11, 2014, 05:13:40 PM »
It might be called None. As long as it isn't zero, as that would .. make it zero, rather than ignoring it.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D