Hi guys I need to join two .X objects. And when they are joined I need that ONLY one of these 2 object may rotate in his central pivot.
In my game :
I had a model helicopter. the main rotor is static like the whole object. But my goal is that the main rotor can rotate (always united with the helicopter body). So I used the wings3D program to split the main rotor from the helicopter body and finally I saved both the main rotor and the helicopter body as two distinct objects.
object 1 : helicopter body
object 2 : main rotor
My final objective:
join these 2 objects and make the main rotor may rotate.
I read a lot of join objects thread but I have a lot of doubts.
Could you put a list of thing I need to do?
Or a simple example code?
I read different ways to join 2 objects (limbs or PERFORM CSG UNION) but neither of these two ways is easy for me.
Solved using this code!
Rem Project: GlueObjectToObject
Rem Created: 31/12/2002 16:07:46
rem Glue object A to object B
rem Creatr the objects
make object box objectA,100,30,40 //corpo elicottero
make object box objectB,100,5,5 //elica
rem Glue child B to target A
glue object to limb objectB, objectA, 0
rem Offset child B to act like a moon around object A
position object objectB,25,25,0
rem Main loop
rem Rotate object B l'elica
yrotate object objectB,wrapvalue(object angle y(objectB)+0.1)
pitch object up objectA,mousemovey()
turn object right objectA,mousemovex()
rem End loop