These are chat archives for highfidelity/hifi
Please join us at our official forum: https://forums.highfidelity.com/c/development High Fidelity is an open source virtual world platform. We are building the software with a mix of full-time developers, part time developers who are paid on worklist.net, and open source collaborators. As use of the virtual world grows, Worklist will also host paid projects run by other teams. https://worklist.net
Hi! Been getting help from Thoys and Seth about this. Melissa suggested I put my WL comment up here in case someone wants to drop some knowledge bombs.
I'm making a dart. Getting it to stick to something in a way that it can be far/near grabbed and thrown again is proving troublesome.
When the dart collides with otherEntity, if we make otherEntity the parent of dart there are some problems.
If dart remains dynamic, its position will change drastically (local position is copied to world position). Sometimes only for a split second and then it rights itself. Sometimes the dart "vanishes" for good.
If dart is made static (like in the bow.js example), it is not far-grabbable (until this is fixed in C++ code, something I've talked with Andrew about). It is near-grabbable, but editing the entity props to change it back to dynamic forces the grab to release. Trying to reset it to dynamic on startNearGrab will make the user grab it twice. Trying to do it on releaseGrab works in theory, but since it's static upon release, it has no velocity so won't move until you grab and throw again. Perhaps we can use the velocity of the hand instead??
Also tried using a Tractor action. This makes the relative position work correctly, however the dart rotates on its own origin rather than the origin of the "parent" object.