is here anybody with knowledge about Joints (Not the Smoking ones

I will create an testexample for my Problem, but here´s it in words:
I have different Entities with Physicsbody (Not the static one, hmm... complex so it´s good for every Situation).
Those should be connected, altogether they are one Object. This Connection has to be fix. Fixed Rotation, fixed everything.
AttachEntityObject() is not working, entity with physicsbody (except static Body) will fall down and is not fixed at its Position and Rotation.
EDIT:
This code here Shows my Problem:
Code: Select all
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>> >>
;>> Name: Jointtest >>
;>> >>
;>> Author: Bananenfreak >>
;>> >>
;>> Date: 24.06.2014 >>
;>> >>
;>> OS: Windows >>
;>> >>
;>> >>
;>> >>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
EnableExplicit
Define.f KeyX, KeyY, MouseX, MouseY
Define nx.f, nz.f, Boost.f = 1, Yaw.f, Pitch.f
Define.i Quit, boden, cyl, count
#kam_0 = 0
#window = 0
#plane = 0
#planent = 0
#CylHeight = 3
#cylMat = 0
Dim cyls.i(#CylHeight - 1)
If InitEngine3D()
Add3DArchive(#PB_Compiler_Home + "Examples/3D/Data/Textures", #PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home + "Examples/3D/Data/Scripts", #PB_3DArchive_FileSystem)
Parse3DScripts()
InitSprite()
InitKeyboard()
InitMouse()
OpenWindow(#window, 0, 0, 1800, 1000, "Jointtest", #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(#window), 10, 10, 2000, 2000, 0, 10, 10, #PB_Screen_SmartSynchronization)
WorldShadows(#PB_Shadow_TextureAdditive, 200, RGB(255 * 0.2, 255 * 0.2, 255 * 0.2), 4096)
AmbientColor(RGB(255 * 0.2, 255 * 0.2, 255 * 0.2))
CreatePlane(#plane, 100, 100, 100, 100, 100, 100)
boden = GetScriptMaterial(#PB_Any, "Scene/GroundBlend")
CreateEntity(#planent, MeshID(#plane), MaterialID(boden), 0, 0, 0)
EntityPhysicBody(#planent, #PB_Entity_StaticBody, 1000)
;-Camera
CreateCamera(#kam_0, 0, 0, 100, 100)
MoveCamera(#kam_0, 0, 20, 0, #PB_Absolute)
CameraLookAt(#kam_0, 20, 0, 20)
CameraRange (#kam_0, 2, 5000)
CameraFOV (#kam_0, 90)
CameraBackColor(#kam_0, RGB(0, 0, 0))
cyl = CreateCylinder(#PB_Any, 1, 10)
CreateMaterial(#cylMat, LoadTexture(1, "Wood.jpg"))
For count = 0 To #CylHeight - 1
cyls(count) = CreateEntity(#PB_Any, MeshID(cyl), MaterialID(#cylMat), 0, count * 10 + 5, 0)
EntityPhysicBody(cyls(count), #PB_Entity_ConvexHullBody, 10, 0.4, 0.1)
Next count
PointJoint(#PB_Any, EntityID(cyls(0)), 0, 5, 0, EntityID(cyls(1)), 0, -5, 0)
Repeat
Repeat
Until WindowEvent() = 0
If ExamineMouse()
Yaw = -MouseDeltaX() * 0.05
Pitch = -MouseDeltaY() * 0.05
EndIf
If ExamineKeyboard()
If KeyboardPushed(#PB_Key_Up)
MoveCamera(0, 0, 0, -1 * Boost)
ElseIf KeyboardPushed(#PB_Key_Down)
MoveCamera(0, 0, 0, 1 * Boost)
EndIf
If KeyboardPushed(#PB_Key_Left)
MoveCamera(0, -1 * Boost, 0, 0)
ElseIf KeyboardPushed(#PB_Key_Right)
MoveCamera(0, 1 * Boost, 0, 0)
EndIf
EndIf
RotateCamera(0, Pitch, Yaw, 0, #PB_Relative)
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1
Else
MessageRequester("Error", "The 3D Engine can't be initialized", 0)
EndIf
End
Greets,
Bananenfreak