Alienhead Posted November 19, 2022 Share Posted November 19, 2022 Greetings, I've since resumed my original project 'defendTHSI!' and I find myself faced with a physics dilemma. I've never been one for deep physics implementation, always just enough to get by with what was needed at the time so my skill in physics development pretty much stayed at a moderate to low understanding. Until now... I've been developing my skill in physics over the past 6 months and I've enjoyed and marveled at what Leadwerks is capable of. My current situation requires me to develop a bobble-head type effect. The screenshot will illustrate what I'm trying to do. This model is a non-animated static model, its a bobble head with a skeleton ontop.. I wish have the attaching arm and the head bobble as bobble heads do. So far Ive tried numerous configurations but I'm yet to achieve what I'm after. My question is the order of the physics pieces. The picture shows my latest configuration and it's as close as I have come to getting it right but it is still way off from acting like a true bobble head. Can any physics minded person point me in the direction I need to go to get this type of effect. ? exp: ( https://www.presentermedia.com/powerpoint-animation/bobble-head-figure-pid-10808 ) I'm using the kinematic as my base, for position and rotation without breaking the physics, the hinge to monitor restraints and the ball to apply the motion effect.. but this does not seem to be correct. I've pretty much transitioned my entire project over to all physics based reactions, I've got controllers built for drone, 1st, 3rd person, tanks, planes, helicopters, ceiling fans and more... but this one I cannot get right and it's bugging the *** out of me lol. Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Solution Josh Posted November 20, 2022 Solution Share Posted November 20, 2022 I can't say for sure if this will work in Leadwerks, but in Ultra you can add a spring to a hinge joint: https://www.ultraengine.com/learn/Joint_SetSpring?lang=cpp You could create a hinge that rotates left and right, and then on the child entity add a hinge that rotates forward and back, with a spring on both. This would act like a ball joint with no twisting. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Alienhead Posted November 20, 2022 Author Share Posted November 20, 2022 Thanks Josh! Now I can't wait to get off work and go try this. Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Alienhead Posted November 23, 2022 Author Share Posted November 23, 2022 Since I'm diving deep into the physics scene, I've got one more question.. In the screenshot, I have physicsdebug on. I need to know if theres a way to check the state of a physics object? Like in the picture the engine colors the active state orange and the sleeping state blue.. What method is available to detect the objects state in code. ty ! Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Josh Posted November 23, 2022 Share Posted November 23, 2022 There is entity->body->Active() but it's only in C++. If GetVelocity() returns (0,0,0) that might be about the same thing. 1 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Canardia Posted January 17, 2023 Share Posted January 17, 2023 On 11/24/2022 at 12:11 AM, Josh said: There is entity->body->Active() but it's only in C++. If GetVelocity() returns (0,0,0) that might be about the same thing. And that GetAngularVelocity() returns (0,0,0) too I guess. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ 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.