Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dragging?? Create pin contraints / handles in runtime?
#1
Hi! I would like to drag an object with a grasper. The thing is that obi particle dragger works as a spring and i need to follow the grasper transform without that bouncing effect, so what's the correct way to do it? Can I create constraints in real time so I can attach the grasper surface to the particles that are being touched?
Reply
#2
(12-11-2019, 04:36 PM)manurocker95 Wrote: Hi! I would like to drag an object with a grasper. The thing is that obi particle dragger works as a spring and i need to follow the grasper transform without that bouncing effect, so what's the correct way to do it? Can I create constraints in real time so I can attach the grasper surface to the particles that are being touched?

Hi,

You could use handles:
http://obi.virtualmethodstudio.com/tutor...ments.html
Reply
#3
(12-11-2019, 04:43 PM)josemendez Wrote: Hi,

You could use handles:
http://obi.virtualmethodstudio.com/tutor...ments.html


The thing is I need to create them in runtime depending on where I "grab" them. Also, they are giving this error:

transform.position assign attempt for 'Ball' is not valid. Input position is { NaN, NaN, NaN }.
0x00007FF75F5F422C (Unity) StackWalker::GetCurrentCallstack
0x00007FF75F5F7701 (Unity) StackWalker::ShowCallstack
0x00007FF75DE8FCA5 (Unity) GetStacktrace
0x00007FF7601AB68D (Unity) DebugStringToFile
0x00007FF7601EEAAE (Unity) Transform::SetPosition
0x00007FF75F700D34 (Unity) Transform_CUSTOM_set_position_Injected
0x000002879ED92CC9 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Transform[Image: confused.png]et_position_Injected (UnityEngine.Transform,UnityEngine.Vector3&)
0x000002879ED92B3B (Mono JIT Code) UnityEngine.Transform[Image: confused.png]et_position (UnityEngine.Vector3)
0x000002879EE0C163 (Mono JIT Code) [ObiSoftbody.cs:65] Obi.ObiSoftbody:OnSolverStepEnd (single) 
0x000002879EE0B3D0 (Mono JIT Code) [ObiSolver.cs:877] Obi.ObiSolver:AllSolversStepEnd () 
0x000002879EE0AE3B (Mono JIT Code) [ObiArbiter.cs:45] Obi.ObiArbiter:WaitForAllSolvers () 
0x000002879EE0A933 (Mono JIT Code) [ObiSolver.cs:784] Obi.ObiSolver:WaitForAllSolvers () 
0x000002879EE06C73 (Mono JIT Code) [ObiSolver.cs:672] Obi.ObiSolver:SimulateStep (single) 
0x000002879EE03B43 (Mono JIT Code) [ObiSolver.cs:866] Obi.ObiSolver:FixedUpdate () 
0x00000287B79C6108 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFDBD02C090 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke 
0x00007FFDBCFB2142 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke 
0x00007FFDBCFBB13F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke 
0x00007FF75F57E462 (Unity) scripting_method_invoke
0x00007FF75F578111 (Unity) ScriptingInvocation::Invoke
0x00007FF75F5311FB (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007FF75F5315E6 (Unity) MonoBehaviour::CallUpdateMethod
0x00007FF75EC35238 (Unity) BaseBehaviourManager::CommonUpdate<FixedBehaviourManager>
0x00007FF75EC3DAA4 (Unity) FixedBehaviourManager::Update
0x00007FF75F0545AC (Unity) `InitPlayerLoopCallbacks'::`2'::FixedUpdateScriptRunBehaviourFixedUpdateRegistrator::Forward
0x00007FF75F03E588 (Unity) ExecutePlayerLoop
0x00007FF75F03E669 (Unity) ExecutePlayerLoop
0x00007FF75F0434DB (Unity) PlayerLoop
0x00007FF75D602A7B (Unity) PlayerLoopController::UpdateScene
0x00007FF75D60052C (Unity) Application::TickTimer
0x00007FF75DE971C0 (Unity) MainMessageLoop
0x00007FF75DE99BDF (Unity) WinMain
0x00007FF760B46952 (Unity) __scrt_common_main_seh
0x00007FFE2DD77BD4 (KERNEL32) BaseThreadInitThunk
0x00007FFE2F08CED1 (ntdll) RtlUserThreadStart
Reply