Jump to content

Recommended Posts

Posted

I have made a rope model and attached bones to it, I can properly move bones in the editor, but when I add mass for one of the bones, this part of the rope simply disappears. How can I make bones act like props so I could connect them with ball joints?

post-11962-0-36739700-1407525054_thumb.png

post-11962-0-50017500-1407525063_thumb.png

Posted

You need to set a mass as well as a shape.

But when I delete shape of the barrel (set it to none), it still falls down like a normal prop. but it doesn't collide with anything.

Ok, how can I set a shape to bone? I didn't manage to do this with "Fit shape" button or with .phy file.

Posted

What Barrel?

 

Personally I wouldn't do it this way, because the bones are all part of the same model. If a bone moves, it might affect its children as well, causing glitchy physics.

I would start of with creating a pivot in the scene which is the rope anchor. The pivot has no mass or phy shape

Then place a cylinder underneath it. the cylinder has a shape and a mass. Then via a script create a ball joint between the pivot and the cylinder.

  • Upvote 1
Posted

What is the function of the barrel in all this?

 

Every individual bone needs a shape. You can make your own phy file or press git shape and adjust the rotation and size by hand. Turn on physics view in the view tab to see what the results are.

  • Upvote 1
Posted

Barrel is just an example of normally working prop without any collision shape. I can't understand why bone doesn't work like the barrel.

I can't set any shape to the bone. When I press Fit shape on the rope mesh it works and orange parallelepiped appears, when I load a .phy file for this mesh it works as well and orange box appears too. But when I fit shape or load the same shape file for the bone, nothing happens. I can't apply shape to bones from another model I previously created as well.

It seems like bones can't have shapes.

Maybe I can use simple meshes instead of bones? Can I attach rope's skin to other meshes instead of bones?

Posted

What you could do is to move and rotate each vertex groups of your ropes skins to each Ball joint position and rotation.

How to get vertex groups in LE3 ?

I put some simple physics joint example project for you to download, you can doownload and test it (just follow the ReadMe File)

export joint.zip

post-3271-0-56241400-1407532136.jpg

  • Upvote 1

Stop toying and make games

Posted

So I need to take bottom polygon of the first cylinder and move it to the position of the pivot between first and second cylinder? Then I need to set rotation of this polygon to pivot rotation and then I need to do the same with top polygon of the second cylinder?

Haha, smart!

I'll try this, thank you guys for helping.

Posted

Just try my example, each cylinder has a pivot object as child, it uses it to position the joint ball to the parent object.

I'm trying right now to make follow the rotation of joints to a rope model with bones, i will post results if things come up good.

Stop toying and make games

Posted

I made some example, i make bones top rotate as same as cylinders.

The probelm is rotation applied on bones is weird, perhaps some GetRotation or SetRotation issue.

At start the bones are ligned horizontally while cylinder are vertically aligned with no rotation ?

 

I put the updated project for anybody to test.

export jpint.zip

post-3271-0-28220600-1407537375.jpg

  • Upvote 1

Stop toying and make games

Posted

I found that default rotation of bones (when rope is vertical) isn't (0,0,0). Probably needs to be fixed in blender to match default rotation of blue cylinders. I'll play with this tomorrow.

Posted

It's not a Blender problem.

(Just need an animated material to have it animated in LE3 otherwise it won't animate even rotating bones)

 

I used GetOmega and SetOmega to set speed rotation on Y to 0 as we don't care about it for a vertical rope, this helps a lot in stability. In the script i also changed Z rotation values by adding -90° so the rop is vertical, now i got the rope working good, i just need to tweak some rotation axe and it will be ok.

Don't worry, i'll post that on tutorials section.

post-3271-0-90462800-1407539164.jpg

Stop toying and make games

Posted

I used wrong button, download is ready now.

(feel free to delete the function postRender on rope.lua script as it was debug code)

 

Cylinders for physics are not so good , the really best would be to use capsule shapes collisions instead , it would avoid collision problems near center of the joints between two capsules.

Stop toying and make games

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.

×
×
  • Create New...