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.

DarkBASIC Professional Discussion / One for the experts

Author
Message
400 pound
18
Years of Service
User Offline
Joined: 4th Sep 2007
Location:
Posted: 5th Jul 2012 00:23
I altered the verticies on a box model in DB Pro, saved it as a .x and .dbo model and tried loading them into an FPSC level. In both cases the model appears and collision is detected with the player but the altered verticies are ignored so you can walk straight through these points. I tried altering the collision values in my FPE file but no luck. V frustrating so any advice would be great.
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 5th Jul 2012 03:16
In your DBP program, try using LOCK VERTEXDATA FOR LIMB with a Lock Mode of 2 instead of LOCK VERTEXDATA FOR MESH:


http://forum.thegamecreators.com/?m=forum_view&t=184274&b=15

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Jul 2012 19:50
Perhaps you will have to set collision to polygons, as Dbpro will check for box collision unless you specify collision to polygons

Cheers.

I'm not a grumpy grandpa
400 pound
18
Years of Service
User Offline
Joined: 4th Sep 2007
Location:
Posted: 5th Jul 2012 23:41
Hi

Thanks for replies all

What is the lock mode? I haven't heard of that before

I was using;

'lock vertexdata for limb object number,0'

this being limb zero on the selected object number to get at the route data.

I have now tried;

'lock vertexdata for limb object number,0,2 but it didn't solve the problem. That said I wasn't aware there was another parameter on this and I am always interested to learn new commands. What does it do?

On the polygon collision side of things, thanks but I had already set this.

Anyone else got any ideas?
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Jul 2012 00:21
You might need to recalculate the object bounds. Have a look at the set object frame command and use the extra final flag. This sounds like when I had culling problems with a terrain object I'd created by manipulating vertices. This was Mike Johnson's advice on that occasion:

Quote: "One way of recalculating the bounds is to call "set object frame". Set the frame to 0 and use a value of 1 for the second parameter. This will update all the bounds for the object."


Try that before doing anything more complicated - it worked fine for me.
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 6th Jul 2012 02:24
The Lock Mode flag controls how DBP treats any changes you make to the vertexdata while it's locked. This is what the help files have to say:
Quote: "If the Lock Mode flag is zero, the entire vertexdata is replaced in the vertex buffer, if the value is one the vertex buffer is merely refreshed which is considerably faster. A value of two will replace the vertexdata in the vertex buffer entirely, and it will also ensure the original data copy of the object is updated as well (useful when saving and bone animating the object)."


400 pound
18
Years of Service
User Offline
Joined: 4th Sep 2007
Location:
Posted: 6th Jul 2012 22:14
Many thanks for taking yout time to look at this. I'll give your ideas a go and let you know how I get on.

Login to post a reply

Server time is: 2026-07-07 17:08:06
Your offset time is: 2026-07-07 17:08:06