Dark Bit Factory & Gravity
PROGRAMMING => General coding questions => Topic started by: Clyde 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.
-
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.
-
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!!
-
I Had tried similar before, good job you told me that or I'd be going around in circles ( bobboomtish).
Haha, hi Clyde! :D
(http://4.bp.blogspot.com/-OBJcMi6DjEQ/Ts6evLcXEwI/AAAAAAAAEDU/fWlBGW2Oz3E/s1600/be-rational-get-real.png)
-
\o/
btw, the default in blitz is degrees.
-
Welcome back Mike!
Good to see you :)
-
Hey Clyde,
Good to see you're back. Hope you're keeping well!
-
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