Jump to content

[Leadwerks Beta] Sliding Joints Refuse to move on local axis.


reepblue
 Share

Recommended Posts

I've noticed that my code below no longer works when I upgraded my project to the Beta. 

m_vClosePositionRight = m_pDoorPieceRight->GetPosition(true);
Vec3 position = m_vClosePositionRight;
Vec3 distance = Transform::Vector(1.0f, 0.0f, 0.0f, GetEntity(), NULL);
Vec3 pin = distance.Normalize();
m_pDoorJointRight = Joint::Slider(position.x, position.y, position.z, pin.x, pin.y, pin.z, m_pDoorPieceRight, NULL);
m_flOpenAngleRight = distance.Length();
m_flCloseAngleRight = 0;
m_pDoorJointRight->SetMotorSpeed(2.0f);
m_pDoorJointRight->SetLimits(0, distance.Length());
m_pDoorJointRight->SetAngle(m_flCloseAngleRight);

Below I've attached a modified script and a map showcasing this issue. Create a new project with the FPS template and install the package below.

  • One set of doors uses global positioning (Default)
  • The next set has doors using local positioning but since it matches the world's origin, it seems it works as intended.
  • The last set of doors are rotated. The doors should move on the model's X axis but they don't move as intended.

doorbug.zip

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...