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 / rotate object around point

Author
Message
Blobblie
17
Years of Service
User Offline
Joined: 5th Dec 2006
Location:
Posted: 5th Dec 2006 10:05
hi, i'm new to the forum.

how can i rotate an object around a point rather than an axis? i.e the front upper left corner of a cube.

thank you
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Dec 2006 10:47 Edited at: 5th Dec 2006 10:48
Welcome to the forums. There's a search button at the bottom of each board, you'll find loads of posts on this topic, here's just a few below.

One thing to point out, rotation is always around an axis. It may just be that your axis is offset, but a "point" doesn't give enough information on how the rotation should take place.


http://forum.thegamecreators.com/?m=forum_view&t=80289&b=7

http://forum.thegamecreators.com/?m=forum_view&t=49499&b=7

http://forum.thegamecreators.com/?m=forum_view&t=63114&b=7



Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 5th Dec 2006 21:00
I think you can just offset limb 0 before you rotate it, using the offset limb command. If you want it to still look centered you can just position the object the negative value of the offset.

I personally am a math freak, so I would do it the hard, complicated way, just for self satisfaction

Blobblie
17
Years of Service
User Offline
Joined: 5th Dec 2006
Location:
Posted: 6th Dec 2006 03:35
thanks a lot zotoaster, that worked fine!

maybe you can help me out with some mathematical problem too, since you said you liked math. how can i deduce what the corner coordinates are, of my 0 limb offsetted, repositioned and rotated cubes? because my aim is to make more cubes, 0 limb offsetted to those coordinates.

and does anyone know why my cpu gets so strained by this code?

thank you

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Dec 2006 16:46
All DB Pro projects use as much CPU as they can get, unless you use SYNC SLEEP(). But that is at the expense of a slower application, you wouldn't use it mid-game



Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 6th Dec 2006 23:04
If you're just asking where the corners are, then you can just get the coordinates of each vertex. There's not one vertex per corner, there's actually 4 for a cube. But you only need the coordinate of 1 vertex from each corner.

Type in get vertexdata position x(), and click on the command, and press F1. That should give you some insight into the vertex commands.

Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 6th Dec 2006 23:28
Actually, from experience of making a 3D modeller, there are 3 vertexes at each corner of a cube. One vertex from each corresponding face.

-Mansoor Siddiquie

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 7th Dec 2006 04:42 Edited at: 7th Dec 2006 04:43
wouldnt it be 6? 2 polys per face for each face combine into 3 sides. hence 6
I guess packages can lose vertices and bind a few polys together until you told the application to break polys into individual groups.

ahh i see where your coming from perhaps some corners do not have a diagonal line between the polys on that corner.

Blobblie
17
Years of Service
User Offline
Joined: 5th Dec 2006
Location:
Posted: 7th Dec 2006 08:31
thank you all. i understand now, that i have to read more tutorials.

Login to post a reply

Server time is: 2024-11-27 01:33:44
Your offset time is: 2024-11-27 01:33:44