TheConceptBoy Posted June 10, 2019 Share Posted June 10, 2019 Good day, everyone. I'm a tad perplexed. I'm attaching a kinematic joing to a model but I don't want the joint to be attached to the smack center of the model because when I use SetTargetPosition(pick_sphere->GetPosition(true),1); Then the target simply gets moved by it's center. I can kind of get that, since the function says you're moving the target of the joint, it would use the targets center point. The question I have then is, What's the point of setting the position for the joint creation with: Joint::Kinematic(pos.x, pos.y, pos.z, entity) What is the purpose of it? There isn't a Join->SetPosition so you can't move the joint? The point here is to move the target to a position NOT by it's center, but by whatever point you're grabbing the objects by. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted June 10, 2019 Share Posted June 10, 2019 https://www.leadwerks.com/community/topic/18966-kinematic-position/?tab=comments#comment-118400 I think the joint is only a constraint, rather than an entity that can be moved. Quote Link to comment Share on other sites More sharing options...
TheConceptBoy Posted June 10, 2019 Author Share Posted June 10, 2019 1 minute ago, Lethal Raptor Games said: https://www.leadwerks.com/community/topic/18966-kinematic-position/?tab=comments#comment-118400 I think the joint is only a constraint, rather than an entity that can be moved. yeah, I'm trying to get the constraint to NOT be in the middle of the object but at the location where the PickInfoData.position reports the collision taken place Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted June 10, 2019 Share Posted June 10, 2019 What exactly are you trying to do? Are you trying to rotate the entity at the picked position? Quote Link to comment Share on other sites More sharing options...
TheConceptBoy Posted June 10, 2019 Author Share Posted June 10, 2019 What I mean is what do the, posx, posy, posz do. They seem to have no effect on the entity that it drags. static Joint* Kinematic(float posx, float posy, float posz, Entity* entity) if I pick a box by it's corner, I want to drag it by the corner. but the kinematic body seems to move the box to the position by it's center. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted June 10, 2019 Share Posted June 10, 2019 As Josh said in the link, it's the offset from the child entity but it cant be changed once created. Probably best to use a kinematic joint on a pivot. Then parent the picked entity to that pivot. Then set the picked entities global position to that of the pivots + an offset. Quote Link to comment Share on other sites More sharing options...
TheConceptBoy Posted June 10, 2019 Author Share Posted June 10, 2019 9 minutes ago, Lethal Raptor Games said: As Josh said in the link, it's the offset from the child entity but it cant be changed once created. Probably best to use a kinematic joint on a pivot. Then parent the picked entity to that pivot. Then set the picked entities global position to that of the pivots + an offset. But that's the thing, I don't think the offset works. It always defaults to the center. even if I set the position of the new join to be at the position of the pick.position, it snaps the box by it's center. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted June 11, 2019 Share Posted June 11, 2019 Yeah that's what I was finding too. I just leave it at 0,0,0. Quote Link to comment Share on other sites More sharing options...
TheConceptBoy Posted June 11, 2019 Author Share Posted June 11, 2019 I got it. Making a tutorial about it now. XD 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.