About Store Forum Documentation Contact



Post Reply 
A JointHelper object to assemble Jointed Objects
Author Message
3DRaddict Offline
Member

Post: #1
A JointHelper object to assemble Jointed Objects
At present there is no visual way of placing any type of joint between any two physics-based objects. I have to do it all in code, trying to remember positions, rotations, constraint limits for exact placement of the specific joint type. So I decided to put my newly acquired knowledge of Esenthel Custom Parameters to some use, and I have put together a JointHelper object for use in the World Editor. This should also enable new users to gain a little understanding of Custom Parameters.

Here is the JointHelper object:
[Image: jointhelperobject.jpg]

Basically, you place it (using the current tools in the World Editor) at the desired position between the two objects you wish to join.
The axis of rotation (for Hinge joints) and axis for lateral movement (for Sliding joints) is the GREEN Y axis, so be sure to orientate the JointHelper accordingly.
By selecting its Param tab you are able to change its parameters to suit your desired situation. These parameters are:

[Image: jointhelperparams.jpg]

"actor0" : supply the name of the first Item object to be joined
"actor1" : supply the name of the second Item object to be joined (or "null" if only the "actor0" is valid)
"drawme" : tick this if you wish the joint name to be displayed (recommended only for debugging purposes)
"JOINT_TYPE" : supply the type of joint using the dropdown list
"limit1" : supply a lower constraint limit for the joint (further explained in the code comments)
"limit2" : supply an upper constraint limit for the joint
"name" : whatever unique name you wish to give for the JointHelper

The object Items to be joined have only one parameter:

[Image: itemobjectparams.jpg]

"name" : whatever unique name you wish to give for the Item object

I have supplied an example project (with code), together with a simple set of primitive assets, which demonstrates the use of my JointHelper.
You can also have a bit of fun firing some missile balls at the assembled objects to determine which joints have been used.

[Image: TestProject.jpg]

Esenthel Project file

Zipped Assets
05-06-2015 06:52 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #2
RE: A JointHelper object to assemble Jointed Objects
Great demo!

Many thanks for this and nicely implemented. I've not done much with physics in my game yet but this should be really useful should I reach that point.
05-09-2015 09:32 AM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #3
RE: A JointHelper object to assemble Jointed Objects
Thanks, Pixel

I'm putting it to use right now... assembling a bicycle! grin
05-09-2015 10:52 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply