playMaker

Author Topic: Grabing an object with mouse and moving [SOLVED]  (Read 4451 times)

roach_779

  • Playmaker Newbie
  • *
  • Posts: 13
Grabing an object with mouse and moving [SOLVED]
« on: March 10, 2013, 09:58:52 PM »
I want to grab an object with a mouse and be able to drag around the screen. What actions should I be using?
« Last Edit: March 13, 2013, 10:53:06 PM by Alex Chouls »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Grabing an object with mouse and moving
« Reply #1 on: March 10, 2013, 11:28:08 PM »
You can use a mouse pick and store as a vector 3. Then have the object follow that vector 3.

Is it a gui type drag or a drag through the scene?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

roach_779

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Grabing an object with mouse and moving
« Reply #2 on: March 12, 2013, 01:03:21 AM »
You can use a mouse pick and store as a vector 3. Then have the object follow that vector 3.

Is it a gui type drag or a drag through the scene?

Thanks for the reply.
Drag through scene.
So, I tried using translate, but rather than moving slowly, it pops into position.
« Last Edit: March 12, 2013, 01:12:06 AM by roach_779 »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Grabing an object with mouse and moving
« Reply #3 on: March 12, 2013, 07:05:51 AM »
You can use a mouse pick and store as a vector 3. Then have the object follow that vector 3.

Is it a gui type drag or a drag through the scene?

Thanks for the reply.
Drag through scene.
So, I tried using translate, but rather than moving slowly, it pops into position.

Use Move Towards, Translate will make a change from A to B in the object coordinates, whereas Move Towards will compute a direct line from A to B and follow it. You'll notice the difference in options.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

3d_Artist1987

  • Beta Group
  • Full Member
  • *
  • Posts: 157
Re: Grabing an object with mouse and moving
« Reply #4 on: March 12, 2013, 10:53:52 AM »
Hi,

try with this action,may be help you.
http://hutonggames.com/playmakerforum/index.php?topic=2509.0

Dev
« Last Edit: March 12, 2013, 11:00:19 AM by dev_xrt »

roach_779

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Grabing an object with mouse and moving
« Reply #5 on: March 13, 2013, 09:28:42 PM »
Thanks guys it worked!