Im wanting to parent a cube to a grab node i have in front of my first person camera. I would use blenders parenting function but the cube doesn’t respond to collision. I was thinking of setting the mass to 0 and doing some kind of delayed worldpos between the grabnode and the cube but .worldposition returns jumble that i am unable to split into x, y and z. i need to split it into xyz so i can use applyforce to keep the cube near the grab node. I assume that using force will have the effect of giving a delayed feel as the camera moves.GrabDropTest.blend (567.9 KB)
Rather than re-covering this, I recommend you have a look at Goran Milovanovic’s grab system tutorial I think this will help you out immensely. I also highly recommend to anyone working with the game engine to go through all of his BGE tutorials on his channel if they haven’t already.
And so this isn’t just a link-to answer, I’ll add that the way he handles carrying an object is by getting a vector from the object to the position where he wants the object to be. He refers to this as the ‘delta’(meaning difference or change) and simply obtains it by subtracting the desired object’s position from the grabber object’s position. By applying that vector as a force to the grabbed object, it will move in the direction of where it needs to be. You will need to multiply the force to make up for the mass of the object and also handle the object’s motion which he covers.
Also, so you’re aware, you can access and manipulate individual elements of worldPosition by referring to them as object.worldPosition.x #or .y or .z
I couldn’t figure out the delta part. thanks for the video!