Create slider constraint

Hi there,

I’m new with 3D physics and I’d like to create a slider constraints on this project:

https://playcanvas.com/project/445779/overview/h-test

basically I want to fix the movement of the red and green disks along their translation axes.

/Offtopic

Reminds be Crash Bash, awesome game it was.

I was thinking on making tests replicating some classic game mechanics for my first game.

By the way, Crash Bash … great game.

I think I have it working.

Basically I need to access directly to Ammo to create a joint like that:

var sliderJoint = new Ammo.btSliderConstraint( this.entity.rigidbody.body, base.rigidbody.body, tDisk, tBase, true);

this.app.systems.rigidbody.dynamicsWorld.addConstraint(sliderJoint);

for that I need the 2 bodies and 2 transformations that are defined by one common point (between the disks and the base )and the axis of the slider.

1 Like

Joints - is something we want to integrate as a Component in the future, to allow it to be setup in Editor.

1 Like

That would be good. To define them in the editor and be able to see their axis.

Did you ever manage to get a slider constraint working using Ammo.js?