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 Discussion / DarkMATTER Weapons. Problem when scaling them! Help please!

Author
Message
Hyp3rSnip3rUK
14
Years of Service
User Offline
Joined: 25th Mar 2010
Location:
Posted: 25th Mar 2010 23:30
Hi, I've had DarkBASIC for ages but I've only just really got into it. When I bought DB, I got a model and texture pack come with it called DarkMATTER. It's got some pretty cool content. Unfortunately, I've encountered a problem with the weapons. I've fixed a weapon model to the screen on my game, however, the limbs on the weapon model are disjointed =[

http://i219.photobucket.com/albums/cc121/Hyp3rSnip3rUK/OddGun.jpg

I tried moving the weapon model away from the camera before fixing it as I though the camera might be slightly inside the weapon. This is not the case. I've also tried other weapon models but they suffer the same problem. I think the problem is that when the model is scaled the parts scale outwards rather than staying in the centre of the model. How do I fix this???
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 26th Mar 2010 00:45
Hello,

From the look of the picture, I would guess you are using the command "Lock Object On" to lock the object to the camera. I would recommend against using it. It can make objects appear "inside out" which kinda looks like what is happening in the picture. It also won't detect collision properly, lighting for the model will be a little different, there are a bunch of reasons. It's a good command for quick locking of content to the screen but not so great when things like the above occur. It doesn't actually position the object where you see it, it just sort of draws (renders) it there. The actual position and rotation of the object are where ever it was positioned with the position object command.

Now, if it actually is a problem with the scaling, depending on the rotation points of the limbs, the limbs can scale outward instead from the center as you mention. Depending on the situation this may not be an easy fix so before getting into that, take a look at this:

Locking Object with Math

Follow through the thread to understand the idea. The function should allow you to lock your weapon to the screen by actually positioning the weapon. I'm basing this suggestion on the look of the picture you included. It definitely looks like the inside out problem of lock object on as opposed to mis-scaled limbs. If that doesn't help, we'll move onto the next step.

Enjoy your day.
Hyp3rSnip3rUK
14
Years of Service
User Offline
Joined: 25th Mar 2010
Location:
Posted: 26th Mar 2010 00:49
Thanks alot for your help Latch =]
I'll let you know how I got on after my next attempt!

Thanks again ;]

Login to post a reply

Server time is: 2024-04-25 01:33:13
Your offset time is: 2024-04-25 01:33:13