Author Topic: Object Orientation  (Read 4165 times)

0 Members and 1 Guest are viewing this topic.

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
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:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
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.

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
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:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1217
  • Karma: 230
    • View Profile
    • Homepage
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! :D

www.kirl.nl
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
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:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Object Orientation
« Reply #5 on: March 14, 2012 »
Welcome back Mike!

Good to see you :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Yaloopy

  • Death From Above
  • DBF Aficionado
  • ******
  • Posts: 2876
  • Karma: 35
    • View Profile
    • UltraPaste
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:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Object Orientation
« Reply #7 on: March 15, 2012 »
Hello Old Beans!!
Keeping well as can be expected, trust you are too.
Provided I don't get any distractions, let's make one of them demo contraptions! :D
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won: