Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Akow, degenerate_762), 1,430 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Setting up complex vehicle-chassis #338341
08/17/10 11:15
08/17/10 11:15
Joined: Aug 2010
Posts: 9
A
a350 Offline OP
Newbie
a350  Offline OP
Newbie
A

Joined: Aug 2010
Posts: 9
Hello,

I know worked through all tutorials I found as well as the official guide for 3DGS, but didn’t found a recommendation how to design my „entity structure“ to achieve my specification.

In a few words:
I would like to give my player the possibility to move around an vehicle in my level. The vehicle-movement is controlled by physic-engine.
My problem now is, that the chassis of the vehicle should have features like:
- switch on/off lights
- have driving-mirrors
- can open doors
- can open the engine-cowling
- switch on/off rotating lights

Is it possible for anybody, to recommend me a solution, which type of entity (model or map-entity) I have to use, how I have to assemble this entity to include all the mentioned features and be able to register this entity to the physic-engine?

Additionally, it should be possible to load the vehicle programmatically into the level (I would like to use the C#-wrapper of Matthias Auer).

All the solutions (entity-types, and combinations of them) I tried to setup, failed at a specific step!

Please help meee!!


Last edited by a350; 08/17/10 11:16.

Acknex A8 Commercial
Windows 7 / 64bit
Intel Core i7-950
GeForce GTX470
Re: Setting up complex vehicle-chassis [Re: a350] #338344
08/17/10 11:51
08/17/10 11:51
Joined: Aug 2010
Posts: 8
Netherlands
M
MisterEd Offline
Newbie
MisterEd  Offline
Newbie
M

Joined: Aug 2010
Posts: 8
Netherlands
I myself is new to this but sounds to me you want alot at the same time tongue

Have you broken everything down and started a piece at the time?

If i understand correctly you want your player model be able to take control of a vehicle and move around in the level?

I think the most important part here is the model vehicle. I think you could use bones or animations to set up to open doors and open the engine-cowling.

I think the lights are programable in C-lite, perhaps setting specific bones as reference points for those lights.

Have you written some code already? Perhaps posting it here makes it easier for people to help you.

Btw, welcome to the forum.

Ed.
I am as green as grass when it comes to gamestuff

Re: Setting up complex vehicle-chassis [Re: a350] #338345
08/17/10 11:53
08/17/10 11:53
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
Make it hirachical:

Create an Physics object, that
handles the physics of the car.

This can be a simple shape resembling your car.
Look up Tutorial and example about how to make the car
run in the physics engine.

Now: make this Physics object invisible!

It serves as your "collision" Masterobject,
and handles all the stuff you need for moving the car in
the world using physics.

Then create the actual car (which is passable / does not have
physics) - all mdl models.
Its is the actual model that is beeing rendered.

This car-frame looks up every frame the position and angles of
the physics object, and sets it values to it.

To have animated elements, do the same for all moving objects
like doors, lights.
(you could integrate doors as animation of the carframe, or
use an extra model) Whatever works better for you.


important is, that the position and angles (pan etc)
is set by the physics "master-object".

This way you simplify the physics a lot, while
having no limits on the complexity about how
your car looks, and animates small elements.


Re: Setting up complex vehicle-chassis [Re: Damocles_] #338346
08/17/10 12:17
08/17/10 12:17
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
i would use bones for stuff like mirros, doors, lights,...

if you use separate models it's a bit harder to attach them per script because you have to avoid gimbal lock.

...
or do they need to be simulated by the physics engine too? then you would have to attach them per physics constraints.

Re: Setting up complex vehicle-chassis [Re: ventilator] #338353
08/17/10 13:39
08/17/10 13:39
Joined: Aug 2010
Posts: 9
A
a350 Offline OP
Newbie
a350  Offline OP
Newbie
A

Joined: Aug 2010
Posts: 9
First, thanks all of you for your really fast replies!

@MisterEd: You are right! I want a lot at the same time. But my experience with software-projects is, it’s better to think hard about all aspects which could come up with your specification, instead of start programming/designing in the wrong direction. But, thanks for welcoming me!

@Damocles_:
Wow, I think your recommended use of an invisible object for the physics, which acts as master-object for positioning, is the piece I looked for! At the moment, I can’t remember a step which former failed, that would not be solved by this solution. Thanks a lot!!!

@ventilator: No. Only the car itself has to be physic-animated. I haven’t thought about the gimbal lock problem, yet. Thanks for advice.

I think, for one case the animated car-frame, for an other the extra-model will be better way. Thanks for both advices!

I’m going to try all this out with my existing test-scenarios, as soon as I can!


You saved me a lot of time and frustration! laugh


Last edited by a350; 08/17/10 13:42.

Acknex A8 Commercial
Windows 7 / 64bit
Intel Core i7-950
GeForce GTX470

Moderated by  HeelX, rvL_eXile 

Gamestudio download | chip programmers | 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