- Home /
Move hit.point
(Basically what I want to do is quite similar to garrys mod object grabbing) I can pick the object up, however I'd like to pick it from that specific point that I hit it up. I've stored the hit.point (Raycasthit hit) in a Vector3. When I grab the object I want the hit point to move with the object.
I'd appreciate some help. If further information is needed, I can provide them.
Answer by sparkzbarca · Dec 30, 2017 at 05:12 PM
probably easiest to create an empty game object at point and have a weld function basically to child the actual object to the parent empty game object.
you cant grab an existing point on the object because game objects are optimized to contain as few vertices as possible, basically there are only a few actual points that make up the object so grabbing the nearest point could be literally a meter away.
this is why you need to either somehow insert a vertice in the mesh at that location or just create an empty game object.
Your answer
Follow this Question
Related Questions
moving random objects to random positions 1 Answer
GUI item with object position+dimensions 0 Answers
Object isnt where its supposed to be when selected 0 Answers
Object position flickering 1 Answer