playMaker

Author Topic: [SOLVED] Playing with add Force / add Torque  (Read 3536 times)

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
[SOLVED] Playing with add Force / add Torque
« on: February 14, 2014, 11:02:49 AM »
Hi,

I noticed that when applying a "force" to an object, make it continue "moving/rotating" like that force was constant variable (like in the space).

What i would like is ; to stop (reduce to 0) the motion movement that force added. What is the best way to do it ?

1) is there any "get force" in order to know what value to opposite to the force ?
2) Should i use a get float in order to know what my object is doing, and trying to play with the value i get ? (like get the rotation, or translation from the object, and then try to stop it)
3) Of course, i could freeze the rotation and translation in the rigidbody, but ... because it instantly stop the motion, what is the difference betweend a simple "rotate", or "translation" action,  no difference at all ? so no interest .

What i would, is the force coming back to what it was before puting the force, it means = 0 , but progressivly.

any clue ? :)
« Last Edit: February 14, 2014, 12:23:53 PM by vonpopov »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Playing with add Force / add Torque
« Reply #1 on: February 14, 2014, 11:27:30 AM »
Easy way: Add Drag on the rigidbody.

Hard way: Design an IK driven sort of system translates player input into an estimated goal and that inputs torque/force authentically onto the hull. ie thrusters literally push the hull at a point and based on control input the system decides which ones to fire. It would see that if input was 0 then if we're still spinning it should fire opposite thrusters to stop the ship from spinning, assuming there is 0 drag (space).
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

vonpopov

  • Junior Playmaker
  • **
  • Posts: 98
Re: Playing with add Force / add Torque
« Reply #2 on: February 14, 2014, 12:23:40 PM »
Easy way: Add Drag on the rigidbody.

Hard way: Design an IK driven sort of system translates player input into an estimated goal and that inputs torque/force authentically onto the hull. ie thrusters literally push the hull at a point and based on control input the system decides which ones to fire. It would see that if input was 0 then if we're still spinning it should fire opposite thrusters to stop the ship from spinning, assuming there is 0 drag (space).


The easy way was what i needed :D
I found my way out (thanks to you!!! and your "drag advise") by tweaking the "Angular Drag"

Now it works :D , hell yeah :D

Thanks you