Defold 1.2.156 has been released

#3

Excited! Will there be an example? :wink:

4 Likes

#4

I have a super ugly test project I used while developing, so I think we should create a good sample/manual for it instead… :slight_smile: But in essence you need to call physics.create_joint between two collisionobject components. You will need to specify a unique joint name (ie unique to collisionobject A) so you can address it later on with physics.destroy_joint, physics.set_joint_properties, physics.get_joint_properties, physics.get_joint_reaction_force, physics.get_joint_reaction_torque etc…

Super simple example:

-- connect two collisionobjects with a fixed joint constraint
physics.create_joint(physics.JOINT_TYPE_FIXED, "obj_a#collisionobject", "my_test_joint", vmath.vector3(0), "obj_b#collisionobject", vmath.vector3(0), { max_length = 20 })

If you turn on physics debug you will be able to see joint as lines as well. :+1:

11 Likes

#5

Wow! I guess this only applies to dynamic bodies?

1 Like

#6

If anyone is wondering what’s happening with the issue numbers we are moving our issue tracker from JIRA (DEF-xxxx) to GitHub (Issue-xxxx or simply #xxxx). The issue tracker will remain private for now but it makes our own workflow easier when we have the issues closer to the source code.

6 Likes

#7

Dynamic and static bodies.

2 Likes

#8

Great!
Looking forward to have a “Add Joint” here:
%E6%97%A0%E6%A0%87%E9%A2%98

1 Like

#9

Yes, that’s the plan, but for now you have to make do with the API and programmatically adding joints.

2 Likes

#10

Playing with the joint features, I can imagine some kind of helicopter delivery game could be fun based on these physics game feels.

Slight variation where you could have a 1 button game where you try to swing around a level avoiding things.

11 Likes

#11

In the latest mail from Bengan at Defold there is a description of the new physics feature, but the link is to https://www.defold.com/manuals/physics/ which still has no single word about joints :confused: The only one I found is in API for now.

0 Likes

#12

Oh, I’ll make sure to update! Thanks!

3 Likes

#13

First version: https://www.defold.com/manuals/physics/#_joints

5 Likes

#14

I’m glad you guys decided to skip the editor support for joints so we get to use them sooner!

Btw I have also been using physics.set_gravity() since the day 1.2.155 released. Even though I’m not doing anything cool with it, it’s really nice to be able to set it from code, rather than editing the game.project file.

3 Likes

#15

Why haven’t we solved this old problem yet? :face_with_thermometer:

1 Like

#16

This is next on our list of improvements to physics. But it is dependent on another engine change where we need to make it cheaper to know when a transform hierarchy has changed. We really don’t want to poll for scale changes every frame but rather have a system where we have some kind of dirty flag or similar.

5 Likes

#17

I’m very happy to read this. On what sprint do you plan to do it?

1 Like

#18

It has not been decided yet. We plan one sprint at a time. What I can say is that the issue has a high priority in the backlog.

6 Likes

#19

I think precision for the view_proj should be changed to highp too.

3 Likes

#20

You need to set highp for view_proj as well… On the Galaxy S10e sprites begin to shake at distances greater than 16384px.

2 Likes

#21

We will update this in the built-in shaders for the next release.

2 Likes

#22

Solved in 1.2.159

2 Likes