Carousel
Blitz3D Forums/Blitz3D Beginners Area/Carousel
| ||
Hope you can help. I have 16 models positioned around & parented to a single centre pivot (eg. a horse carousel) When I turn the pivot, the models indeed turn as I expect, but I need their angle to change also. Is AlignToVector the command I'm looking for to achieve this? Thanks in advance for any help. |
| ||
Why not use TurnEntity to rotate the objects ? |
| ||
The horses should turn with the pivot like in this code:Graphics3D 800,600,32,1 SetBuffer BackBuffer() pivot = CreatePivot() For t = 0 To 359 Step 45 cone = CreateCone(8,True,pivot) PositionEntity cone,Cos(t)*5,0,Sin(t)*5 RotateEntity cone,90,t,0 Next camera = CreateCamera() PositionEntity camera,0,0,-10 light = CreateLight() RotateEntity light,45,45,0 While Not KeyHit(1) Cls RenderWorld Flip TurnEntity pivot,0,1,0 Wend |
| ||
They do with your code. Doh! Cheers. |
| ||
turnentity will turn it regardless of its current orientation. You may also use Rotateentity, but you have to use the last parameter, that is a flag that defines if you want to rotate it locally or globally. Zero (local) means it will rotate relative to the parent orientation (like in your carousel). One (global) means it will rotate relative to the world (aka absolute). You can use this global flag with a lot of commands. |
| ||
Thanks for all the help, got what I wanted in the end.. Run the code and you'll see what I was after, only a framework at the mo, but I'll finish the rest tomorrow in work when I'm back at the office. I have a 3Ds Max artist (lucky me) that will provide me with fruit symbols to replace the cubes. This is the start of my 2nd project. I've used Blitz to generate 2D gfx of 3D rendered scenes for an embedded system for a previous project, including Tokamak to simulate throwing dice. The embedded system can only display BMP's (not rendered 3D) so I've written numerous applications in Blitz to capture the rendered output. My first project (fruit machine) is currently selling well in Spain. Maybe do a show case to show you all what I've been up to the last year. Thanks again... Still think one of the strengths of Blitz as a language is this forum. |
| ||
Awesome a Blitz fruit machine! I love it. |
| ||
Aye, complete with mechanical and video reels - bit of a hybrid. |
| ||
What happened to this? |