Page 1 of 1
					
				rotating an object around a certain point
				Posted: Thu Sep 04, 2003 2:47 pm
				by bernardfrancois
				hello,
is it possible to rotate a 3d object around a certain point, and not around it's center?
			 
			
					
				
				Posted: Thu Sep 04, 2003 8:53 pm
				by coldarchon
				are you talking about a distance or a track algorithm?
			 
			
					
				
				Posted: Fri Sep 05, 2003 12:37 am
				by Kale
				You could use a little math and use Sin() and Cos() to plot a circular path around a point.
			 
			
					
				
				Posted: Fri Sep 05, 2003 11:31 am
				by bernardfrancois
				I tried to do that, but there's something wrong with my procedure:
Procedure RotateParticleEmitterArround(emitter,xpos,ypos,zpos,xrot,yrot,zrot)
  xdelta=Abs(ParticleEmitterX(emitter)-xpos)
  ydelta=Abs(ParticleEmitterY(emitter)-ypos)
  zdelta=Abs(ParticleEmitterZ(emitter)-zpos)
  ; X rotation
    ymov=Sin(xrot)*ydelta
    zmov=Cos(xrot)*zdelta 
  ; Y rotation
    zmov=Sin(yrot)*zdelta
    xmov=Cos(yrot)*xdelta
  ; Z rotation
    
  RotateParticleEmitter(emitter,xrot,yrot,zrot)
  MoveParticleEmitter(emitter,xmov,ymov,zmov)
EndProcedure
anyone who sees what's my mestake?