Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Collision box not rotating with .x model

Author
Message
Mk II
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 13th Nov 2010 15:34
I've downloaded and converted this modelhttp://gfx-3d-model.blogspot.com/2009/09/maxximus-16-atx-3d-model.html to a .x format and imported and scaled it just fine.

The problem is that the collision box doesn't seem to rotate as the object rotates (ie moved by the player).

Help would be appreciated.

Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 13th Nov 2010 18:30
From the help page on MAKE OBJECT COLLISION BOX



and



I haven't tested, but maybe using a flag of 1 would work for your program.

Mk II
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 13th Nov 2010 20:52
Thanks for your response.

I change the value to 1, however the collision box seemed to be rotated but when the objects collide they get stuck and don't slide off each other.

This is still my problem as the box doesn't rotate with the model:

"when the object is rotated the fixed collision box orientation remains unrotated to aid in the effect of sliding collision."

Is there anyway to orientate the collision box with the object?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Nov 2010 00:34 Edited at: 15th Nov 2010 07:11
Quote: "I change the value to 1, however the collision box seemed to be rotated but when the objects collide they get stuck and don't slide off each other."

That seems like it may partly be a coding issue. You would need to save the x, y and z coordinates before moving the vehicle and then check collision. If the collision occurs, you would have to implement gravity forces on the vehicle and whatever you hit, depending of course on what it was. If you hit something solid, you could simply put the vehicle back where it was before the collision, or even move it backwards a little bit.

It's probably nothing, but I noticed you rotated the model 270 degrees after it is loaded. You should code
on the line after YRotate Object 7,270.

EDIT: That model has an INSANE amount of polys (53K I think). DBPro is likely not going to be able to maneuver that vehicle around in an environment with a decent FPS anyway. You need a much lower-poly model. See if you can find something in the 2000 - 5000 poly range.

Mk II
14
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 15th Nov 2010 22:26
Thanks for the replies I will look into the collisions some more. I have downloaded sparkys dll so will take a look at some of those demos, and plan my next move.

@LBFN the frame rate seems fine with two of those vehicles, although I haven't textured it yet (haven't figured out how, as texture object doesn't work, but I'm new to DB so it's I'm approaching it completely wrong)
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 16th Nov 2010 02:24
2 X 53,000 = 106,000 polies. That is a ton for DBPro to render in addition to your 'world'. You will realistically have to be very creative in order to maintain a decent framerate by the time you put in all of the collision checks, run your HUD, process game info and objects, etc.

Models like that look fantastic, but they really are not designed to be used in a fast-paced DB Pro game. The model has all kinds of interior details, which you will never see in a game typically, and yet you are asking your computer to render every last poly. The only way I could see using it is (if you had the appropriate permission) to edit the model using 3D modeling software and eliminate polygons that you will never see in a game.

As to the texturing issue, you will possibly have to texture each limb individually.

Login to post a reply

Server time is: 2024-11-24 09:16:48
Your offset time is: 2024-11-24 09:16:48