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 / Rotation problem :(

Author
Message
Alan Brito
4
Years of Service
User Offline
Joined: 5th Nov 2014
Location:
Posted: 5th Nov 2014 03:53
Can someone helpme ?
I want to rotate limbs over his own axis without translation but I don't get it.

My code:


This is whats happen when I try to rotate:


And this when I try to turn:
http://s29.postimg.org/8txmrrmt3/image.png


Thanks
Derek Darkly
7
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 6th Nov 2014 03:07 Edited at: 6th Nov 2014 03:10
BY THE POWER OF GREYSKULL!!

I'm going to bed soon, but do you mind uploading the model for someone to try?

Alan Brito
4
Years of Service
User Offline
Joined: 5th Nov 2014
Location:
Posted: 6th Nov 2014 11:44
Here you have.

Attachments

Login to view attachments
Scorpyo
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 6th Nov 2014 12:46
It's probably the 3ds format putting the limbs origin to the center of the model thus rotating from there.
I'll upload this elementary putility of mine for you to use.
Instructions are written on screen.
Anyway Use l to browse through model limbs.
1,2, and 3 to rotate visible limb and see if it rotates correctly
cheers

Attachments

Login to view attachments
Scorpyo
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 6th Nov 2014 12:59 Edited at: 6th Nov 2014 13:00
Forgot to say to put the exe in the models folder and run it.
I'll attach a .3ds and .x example of the same model here for you to check
pressing F1 you can save any model to .dbo format
Cheers Scorpyo

(probably a double post, last one did not appear)

Attachments

Login to view attachments
Alan Brito
4
Years of Service
User Offline
Joined: 5th Nov 2014
Location:
Posted: 10th Nov 2014 00:20
I couldn't run your program because always get DX9c message box even whe I install the lastest dx9c, but thanks for the help.
Scorpyo
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 11th Nov 2014 18:55
you should try to rightclick on the exe and and in poroperties / compatibility select Windows xp service pack 2 or 3.
Are you on Windows 8?
What modeler have you got? there is a work around if you use Milkshape 3d.
It could work with your modeler too
put a bone on each wheel, assign each wheel vertices to each bone , export to .x DX Retained mode and rotate the bones as limbs in DBP.
In this case the bones act as pivot points for the wheels.

Or you can rig the model (put bones) and set a spinning animation for the wheels, save the animated model (in DirectX sking & bones mode) and play the animation in DBP.

See attached pic

Cheers
Scorpyo

Attachments

Login to view attachments
LBFN
12
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Nov 2014 01:11
Okay, I rigged the car model for you in Milkshape (as Scorpyo suggested) so that each wheel is a bone/joint/limb. I did animate the wheels, but I'm not sure that is what you are after and it doesn't look as nice as simply rotating them. I re-did the wheels so they weren't so blocky and I edited the texture on them a tad - hope that is okay.

I revised the code a little to reflect on the limbs associated with the wheels. It looks at the current X angle and adds to it, making the wheels spin while the car itself is spinning around. The code does not look at the keys pressed, they simply spin.

My hope is this will help you to get where you want to go with this.

You will need WinRar to unzip this. Google it if you need it - they should have a free trial of it.

So many games to code.....so little time.

Attachments

Login to view attachments
Scorpyo
16
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 14th Nov 2014 13:23
Here is a slightly more refined example where you can drive the car
Cheers
Scorpyo

Attachments

Login to view attachments
Alan Brito
4
Years of Service
User Offline
Joined: 5th Nov 2014
Location:
Posted: 19th Nov 2014 20:38
Thanks to both, I'm very grateful

Login to post a reply

Server time is: 2019-06-24 11:09:33
Your offset time is: 2019-06-24 11:09:33