3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: 2.5D space/vehicle idea  (Read 1071 times)

« on: May 25, 2010, 01:30:56 PM »
just messing around trying to see if i could make something i thought of. it actually works pretty good, just i don't know how to tell an object to stick to an orientation i want it to. (rotate along y axis, but x and z remain 0)

uses mouse for direction and throttle (farther=faster)

Currently using 7.22
« Reply #1 on: May 25, 2010, 02:00:48 PM »
You should be able to modify this for your purposes... I didn't look at your demo, but I made this a while back and it sounds like it's close to what you want.
best of luck

Code: [Select]
objnum=2;
int[] obj(objnum);

void Main()
{
   if(iInitializing())
    {
     obj[0]=OBJ_0;
     obj[1]=OBJ_22;
    }
   for(int x=0;x<objnum;x++)
    {
     Vector3 loc;
     Quaternion orient;
     iObjectLocation(obj[x],loc);
     iObjectOrientation(obj[x],orient);
     loc.y=0;
     orient.x=0;
     orient.z=0;
     iObjectLocationSet(obj[x],loc);
     iObjectOrientationSet(obj[x],orient);
    }
}
« Reply #2 on: May 25, 2010, 10:37:18 PM »
thanks, i took a look at what i had to do that and it was very similar, although i swapped orientation setting of the skinmesh to setting orientation of the rigidbody. not really supposed to do that, but it worked.

Currently using 7.22
Pages: [1]