Gobe Posted December 12, 2009 Share Posted December 12, 2009 Hello. Well I've suggested this many times I know (i'm annoying) but I think the getPedBonePosition function has limits, it would be better in my opinion having the same function as the .scm original gta sa's script, it would be like attachElementToPedBone and attachElementToPedBoneOFFSETS because, it would allow scripters to attach anything they want to the player's bone (Well I've seen SA-MP done that with SpecialActions but their function isn't generic, you can just attach bottles and a cig/joint) + with offsets we could attach burgers, pizzas, wallets, cellphones... to player's hand etc. I think (if I'm wrong i'd like to know how to do) this is not possible right now with the single function we got. Well I hope you guys will think about this, sorry for my English it's 4.41 am here and i didn't sleep (lol) and if you can actually do that, I'd be damn happy . Thanks for your attention. Link to comment
Gamesnert Posted December 12, 2009 Share Posted December 12, 2009 There's no real need for a function like this. The reason is that it has already been scripted. (mostly) Check out the "briefcaserace" gamemode. The briefcase will be attached to your hand. The only thing it lacks is rotation if I remember correctly. Link to comment
Gobe Posted December 12, 2009 Author Share Posted December 12, 2009 Well then another function is needed, + the actual function doesn't allow us to attach it with offsets. Link to comment
Gamesnert Posted December 12, 2009 Share Posted December 12, 2009 There isn't any other function required, just a bit of mathematics... Link to comment
Gobe Posted December 13, 2009 Author Share Posted December 13, 2009 oh. Then, could you explain me how to calculate the angle of the bone (for example, the hand) because, I have really no ideas of how to do that. Link to comment
Gobe Posted December 16, 2009 Author Share Posted December 16, 2009 Sorry for double post but, anyone do know how to? I'd like to know how to do with offsets too. Link to comment
Beagle[NL] Posted December 28, 2009 Share Posted December 28, 2009 Hi Gobe, I was actually looking for this function too. I was suprised this function wasn't there, I already made a custom model to attach to a bone. I tried to make a script to replace the function, but it isn't possible (well, with limited functions). It would be very nice if this function gets implemented into the next version. Anyway, the script I made got the bone position and the rotation of the player. Then it put the object at that position/rotation. It's very buggy, when you crouch the object doesn't move with the bone and when you walk forward you get the same problem. It doesn't refresh fast enough, but when he e.g. moves his head the object doesn't rotate too. So it isn't possible to imitate very well. I also tried rigging my model to a ped, but then I saw that it wasn't possible to replace a ped model . So I think the only way is waiting... Link to comment
Gamesnert Posted December 28, 2009 Share Posted December 28, 2009 Anyway, the script I made got the bone position and the rotation of the player. Then it put the object at that position/rotation. It's very buggy, when you crouch the object doesn't move with the bone and when you walk forward you get the same problem.. What exactly do you mean with "move with the bone"? It doesn't refresh fast enough, What are you using? setTimer or onClientRender? onClientPreRender should work fine. but when he e.g. moves his head the object doesn't rotate too. So it isn't possible to imitate very well. You just need to take the rotation into account and calculate a little with it, if you don't already do that. Can you perhaps post the script you made? Plenty of people around who can help look for ways to improve your script. Link to comment
DiSaMe Posted December 28, 2009 Share Posted December 28, 2009 That function would be useful because you can't calculate rotation in all three axes from two points. Link to comment
Dark Dragon Posted December 28, 2009 Share Posted December 28, 2009 use a 3rd point of your choice then Link to comment
Recommended Posts