Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 5,706 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How can i group car elements (tires,body) #411403
11/16/12 11:15
11/16/12 11:15
Joined: Nov 2009
Posts: 13
Turkey Ankara
kadir Offline OP
Newbie
kadir  Offline OP
Newbie

Joined: Nov 2009
Posts: 13
Turkey Ankara
Hi everyone,
I don't have any information about that. I want to group car elements. I have car body and 4 tires in word. I designed car position and put the tires in the car body. The front tires was going when i was press the w key but the car don't going beacause tires don't merged the car body.
How can i do this please help me?


### From Turquie ###
Re: How can i group car elements (tires,body) [Re: kadir] #411406
11/16/12 11:32
11/16/12 11:32
Joined: Jul 2008
Posts: 2,111
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,111
Germany
try

This example connects a tire model / more tire models to your car body. Play around in _add_tire. Its up to you. With this source you should be able to connect tire(s) to car with fixed pos, vertex or bone pos.

Code:
void _add_tire()
{
 while(you)
 {
   VECTOR _p, _a;
 // simple connection without bones or vertex (fixed pos)
   vec_set(my.x,   you.x);
   vec_set(my.pan, you.pan);
 // or add bones at your car body, where the tire(s) should
 // be placed and use this
    vec_for_bone(_p, you, "TirePos1");
    ang_for_bone(_a, you, "TirePos1");
   // or place a vertex at the pos where the tire(s) should be placed
   vec_for_vertex(_p, you, 123); // Vertex 123

   vec_set(my.x, _p);
 //vec_set(my.pan, _a);
  wait(1);
 }
 // car body lost ?
 ptr_remove(me);
}
action MyCar()
{
 ent_create("tire.mdl", vector(my.x, my.y, my.z), _add_tire);
// ent_create("tire.mdl", vector(my.x, my.y, my.z), _add_tire2);
// ent....
// ent...

 while(1)
 {
   // your car code
  wait(1);
 } 
}

When using one model 4 one tire, i would use different functions like _add_tire_front_left etc.
greets

Edit a day later grin
Just seen this thread is under physics...then i guess my post wont help u much grin

Last edited by rayp; 11/19/12 21:14.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1