playMaker

Author Topic: Virtual Joystick use force instead of transform position?  (Read 4258 times)

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
Virtual Joystick use force instead of transform position?
« on: January 17, 2014, 05:00:23 AM »
I'm having this long mind exercise to try to figure out how to make the virtual joystick work so instead of transform position i need to use force to move my object.

Any advice or idea on how can this be acheved?

Thanks
Sign Up Now @ StartApp.com

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Virtual Joystick use force instead of transform position?
« Reply #1 on: January 17, 2014, 09:09:34 AM »
 What do you mean by virtual joystick?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
Re: Virtual Joystick use force instead of transform position?
« Reply #2 on: January 17, 2014, 07:56:28 PM »
What do you mean by virtual joystick?

The Virtual Joystick controls like this https://www.assetstore.unity3d.com/#/content/3322
Sign Up Now @ StartApp.com

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Virtual Joystick use force instead of transform position?
« Reply #3 on: January 17, 2014, 08:43:54 PM »
Ahh ok, I dunno about that one it just depends on what kind of information you get from the Joystick script. You'll need to use whatever inputs its giving back and put that into a control system that uses physics.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
Re: Virtual Joystick use force instead of transform position?
« Reply #4 on: January 17, 2014, 09:17:52 PM »
I can take the input from the Joystick for example to have it move another object via transform, and store speed or velocity in a variable, but the
put that into a control system that uses physics.
is the part that keeps me up at night :D :D :D

Sign Up Now @ StartApp.com

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Virtual Joystick use force instead of transform position?
« Reply #5 on: January 17, 2014, 09:29:50 PM »
Is it returning vectors or floats? Add Force accepts both, so if its a vector its pretty simple, run the input results through a multiplier and feed them into add force. Probably want to use a separate FSM to handle orientation of the character though.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
Re: Virtual Joystick use force instead of transform position?
« Reply #6 on: January 17, 2014, 09:54:44 PM »
I will try different methods throughout this weekend, and i will update the post on my progress.

As always, thank you on your advices Lane, i appreciate it.
Sign Up Now @ StartApp.com

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
Re: Virtual Joystick use force instead of transform position?
« Reply #7 on: January 29, 2014, 09:35:55 AM »
A bit late than promised but,i did a lot of testing and trying out different solutions and at the end i made a combination between leaving the object to be a rigid body and moving it by transforming its position and simulating physics by easing the movement in and out.
Behavior is similar as adding force, so its good enough :)
Sign Up Now @ StartApp.com