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 / Any MetEdit users? Have a problem with objects not sitting still

Author
Message
Bursar
17
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 6th Aug 2010 00:57 Edited at: 6th Aug 2010 00:58
*d'oh - just notice I misspelled the title. -1 internet for me

I've used MatEdit 1.6 (ace program by the way, would love to see an updated version) and used the option to output a stand alone program.

When I run this in DBP, everything is great. I've added a bit of code to load a 3D model, and position it using definitive values (such as: position model 100,50,50,50). When I start my app, the model appears, apparently in the right place. As soon as I click the mouse buttons to move back/forward across the map, the model moves. I've tried placing a hotpoint in MatEdit and placing the model that way, but it still moves around.

I'm doing anything programatically to move the model, and I've tried putting the position model command in the main game loop so it gets set every frame, but it doesn't help.

Below is the code to load and setup the model which I call outside of the main loop, but I don't think this is involved in the problem.



I suspect there's something going on with the MatEdit code, but I don't know why (or how) it could be interfering with my models position. Any help would be appreciated.
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 6th Aug 2010 01:05 Edited at: 6th Aug 2010 01:06
I used to use matedit many moons ago for DB classic. Didn't use the options for object placement though just the nice martix editing tools. Are the objects floating in the air slightly? That can give the impression of movement even when there is none. Try printing the x,y,z co-ords of the offending object and see what actually happens to them when you move. It may also be a pivot point issue.

http://s6.bitefight.org/c.php?uid=103081
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Aug 2010 01:06
Nothing in the code you posted would cause any problems in your loop as it is only the setup code... why post it if:
Quote: "Below is the code to load and setup the model which I call outside of the main loop, but I don't think this is involved in the problem"

?
?

Quote: "I suspect there's something going on with the MatEdit code, but I don't know why (or how) it could be interfering with my models position. Any help would be appreciated."

So post the code and maybe someone will help...?

Bursar
17
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 6th Aug 2010 01:24
The MatEdit produced .dba file is quite large, which is why I didn't post it.

Problem solved

Basically, although the model was being reported as being in the right place (by outputting its X,Y,Z location), it wasn't. When I moved the camera, the model warped to the correct locaton.

A little odd, but I can live with it now I know what's going on.
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 6th Aug 2010 04:44
Sounds like you invented warp drive there!

http://s6.bitefight.org/c.php?uid=103081

Login to post a reply

Server time is: 2026-07-25 12:05:20
Your offset time is: 2026-07-25 12:05:20