- Home /
Soft first person interaction with rigidbodys.
I have an interaction script on my first person controller. The script sends out an Raycast to detect objects that are interactable. If the object can be picked up and held in front of the player it basically sets the objects position to a predefined point in front of the camera.
holdPoint = Camera.main.ViewportToWorldPoint(new Vector3(0.5f, 0.5f, tempDistance));
hit.transform.position = holdPoint;
How would I go about achieving a more gentle hold, like how it is done in most of the elder scrolls games. Is it possible to use something like a spring joint?
Here is an example from Skyrim. LINK
Hope this is clear enough, not really sure how to explain it.
Thanks - Matt
Answer by softrare · Jul 22, 2013 at 10:56 AM
Yes, its possible. There is the DragRigidbody.js script, but I don't know where to find it anymore, google for the name of the script and you'll probably find it somewhere.
Your answer
Follow this Question
Related Questions
Having a RaycastHit event create a component? 1 Answer
Problem With RayCast 3 Answers
thousands of raycasts in nested for loop 0 Answers
Need help with Raycasting 1 Answer
Raycast problems in my AI 1 Answer