hello,
is it possible to rotate a 3d object around a certain point, and not around it's center?
rotating an object around a certain point
-
bernardfrancois
- User

- Posts: 47
- Joined: Tue Sep 02, 2003 9:17 am
- Location: Belgium
- Contact:
-
coldarchon
- New User

- Posts: 4
- Joined: Tue Aug 19, 2003 10:34 am
-
bernardfrancois
- User

- Posts: 47
- Joined: Tue Sep 02, 2003 9:17 am
- Location: Belgium
- Contact:
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?
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?

