Changing jit.phys.body pivot point
Jun 13 2019 | 11:29 pm
How would I go about changing the point a jit.phys.body rotates around? I've looked at the hinge object and this doesn't seem to do what I'm trying to achieve, also the jit.phys.body needs to be kinematic so this wouldn't work anyways.
- Jun 14 2019 | 4:41 amOk so I've instead decided to use jit.gl.model to do this instead after following a past forum post on the same topic. Now my question is, how can I set an anchor point without moving the position of the object in the process? I'm trying to actively change the anchor point on an object while keeping the object at a set position. I'm currently working on a workaround to offset the position whenever the anchor is changed, but this is incredibly messy with the anchor point being constantly updated.
- Jun 14 2019 | 5:14 pmnot sure what you're trying to achieve, but the tool most useful for these kinds of hierarchical transformations is jit.anim.node. see if the following patch helps clarify, and if not please describe more and post a patch:
- Jun 14 2019 | 5:30 pmThank you for the response Rob. I'm taking a look at the patch to see if I can get this working how I want it to. In the meantime here's a patch with a clearer demonstration of what I'm talking about.
- Jun 14 2019 | 6:04 pmThis is closer to what I'm trying to get. I may have been over complicating things. I'm going to try to see if I can get this working in my bigger project.
- Jun 15 2019 | 1:01 pmSo yeah this kind of works, but it causes jittery movement with physics (I'm making a game that centers around rolling a ball). I plan to keep the anchor point updated live and have the object stay at the same position. This means I have to constantly add an offset to the object to snap it back in place which causes the physics to throw objects around because of the sudden positional changes.I've also started using jit.anim.node like you did in your patch for the transformations but I'm not seeing any differences from just changing the positions/rotations of an object directly. Does jit.anim.node handle this more smoothly or something?But my main question here is if there is some kind of trick or hack to be able to change an objects anchor point without changing the position of it in the process.