### Author Topic: Object Orientation  (Read 640 times)

0 Members and 1 Guest are viewing this topic.

#### Clyde

• A Little Fuzzy Wuzzy
• Posts: 7248
• Karma: 71
##### Object Orientation
« on: March 14, 2012 »

Dear DBF Interactive,

I am tinkering around with an idea, but am stuck with rotating the objects so they resemble that of a dial.

Imagine a clock face with markers, a volume control, or better still the rays of a sun. Maybe cog teeth would be a better example, as that is an idea i've had floating about for eons. Where each bit is set at an angle as they go around.

I've got the positions worked out with sin and cos and 360.0f / amount_of_markers.
but the divide markers are not equally spread; best to imagine a clock face, 3 6 9 12.

I have compiled and added at blitz3d example of it so far. I hope you get what I'm waffling on about.

Nice to see you again, and many thanks.
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

#### Stonemonkey

• Pentium
• Posts: 1274
• Karma: 95
##### Re: Object Orientation
« Reply #1 on: March 14, 2012 »
Hi Mike, long time no see.

Whatever angle you're using to calculate the x,y coords of the object is the same angle you should turn the object by.

the only thing might be a problem, I can't remember about blitz, is whether the 3D stuff and trig functions are degrees or radians and whether they're both the same.

#### Clyde

• A Little Fuzzy Wuzzy
• Posts: 7248
• Karma: 71
##### Re: Object Orientation
« Reply #2 on: March 14, 2012 »
Ace & thanks!!
Great to see and hear you to Dude! I am still alive.

I Had tried similar before, good job you told me that or I'd be going around in circles ( bobboomtish). Needed to add a minus to  points angle in the z rotating value!!
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

#### Kirl

• Senior Member
• Pentium
• Posts: 986
• Karma: 219
##### Re: Object Orientation
« Reply #3 on: March 14, 2012 »
I Had tried similar before, good job you told me that or I'd be going around in circles ( bobboomtish).
Haha, hi Clyde!

www.kirl.nl
Challenge Trophies Won:

#### Clyde

• A Little Fuzzy Wuzzy
• Posts: 7248
• Karma: 71
##### Re: Object Orientation
« Reply #4 on: March 14, 2012 »
\o/

btw, the default in blitz is degrees.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

#### Shockwave

• good/evil
• Founder Member
• Posts: 17297
• Karma: 489
• evil/good
##### Re: Object Orientation
« Reply #5 on: March 14, 2012 »
Welcome back Mike!

Good to see you
Shockwave ^ Codigos
Challenge Trophies Won:

#### Yaloopy

• Death From Above
• Posts: 2837
• Karma: 32
##### Re: Object Orientation
« Reply #6 on: March 15, 2012 »
Hey Clyde,

Good to see you're back. Hope you're keeping well!
Fuck L. Ron Hubbard and fuck all his clones.
Challenge Trophies Won:

#### Clyde

• A Little Fuzzy Wuzzy