Another interesting aproach is in "tunnels", a demo of Tom Higgins at
http://www.shockwavemovies.com   It uses the modelsUnderRay for detect and
resolving collisions. I found it better than the other one I told you before.

Jean Charles Henry wrote:

> Hi Augustin,
>
> Thank you I'm going to test this new version, but I've already link a
> geometry to the camera.....
>
> Bye
>
> Jean-Charles
>
> -----Message d'origine-----
> De : Agust�n Mar�a Rodr�guez [mailto:[EMAIL PROTECTED]]
> Envoy� : mercredi 22 ao�t 2001 15:12
> � : [EMAIL PROTECTED]
> Objet : Re: <lingo-l> : 3d collision
>
> Hi, Jean.
>
> Unfortunately, you can�t add the collision modifier to a camera.
>
> Here�s something you can do:
> 1) Create a dummy (sphere, for example).
> 2) Apply the collision modifier to the sphere.
> 3) Move the sphere (not the camera)
> 4) Make the camera child of the sphere.
>
> There are several ways for doing this. Try this one or go to Macromedia�s
> site
> or http://www.shockwavemovies.com to look for more detailed examples.
>
> Well... I�ll pass you some of what I did (lot of spanish in this code).
>
> On beginsprite me
>
>   --Datos iniciales
>   pMember = sprite(me.spriteNum).member
>   pSprite = sprite(me.spriteNum)
>   pCamera = sprite(me.spriteNum).camera
>
>   --Resetear el mundo 3D
>   pMember.resetWorld()
>
>   --CREAR Esfera para la c�mara
>   EsfModRes = pMember.newModelResource("Esf_Cam",#sphere)
>
>   --DEFINIR medidas del RESOURCE de la esfera
>   EsfModRes.Radius = 0.32
>
>   --Armar Esfera
>   pMember.newmodel("Esf_Cam", EsfModRes)
>
>   --Invisible
>   --pEsf.visibility = #none
>
>   --Definir variable de la esfera (MODELO)
>   pEsf = pMember.model("Esf_Cam")
>
>   --Colisi�n con Muro
>   Muro = pMember.model("Puerta_Ent")
>
>   pEsf.addModifier(#collision)
>   pEsf.collision.enabled=TRUE
>
>   Muro.addModifier(#collision)
>   Muro.collision.enabled=TRUE
>
>   pEsf.collision.mode = #sphere
>   Muro.collision.mode = #box
>
>   pEsf.collision.resolve=true
>   Muro.collision.resolve=true
>
>   Muro.collision.immovable=true
>
> end BeginSprite
>
> on exitFrame me
>
>   --put sprite(2).member.model("puerta_ent").keyframeplayer.playing
>
>   -- Mover con teclas
>   if keyPressed (123) then pEsf.rotate (0, 1.4, 0)        --Rotar
>   if keyPressed (124) then pEsf.rotate (0, -1.4, 0)       --Rotar
>   if keyPressed (125) then pEsf.translate (0, 0, 0.1)   --adelante
>   if keyPressed (126) then pEsf.translate (0, 0, -0.1)  --atr�s
>   if keyPressed (",") then pEsf.translate (-0.1 , 0, 0) --ir de cot� izq
>   if keyPressed (".") then pEsf.translate (0.1 , 0, 0)  --ir de cot� der
>
>    --igualar ubicaci�n de c�mara y esfera
>   pSprite.camera.transform.position = pEsf.transform.position
>   pSprite.camera.transform.rotation = pEsf.transform.rotation
>
> end
>
> This is a different way to do it. Well, I hope this helps you. Bye.
> Agust�n.
>
> Jean Charles Henry wrote:
>
> > Hi list,
> >
> > I've tried different scripts, those given in this list, to add collision
> to
> > a camera, but unfortunately it doesn't work :-((
> >
> > I think I make a mistake on the place for this script.
> >
> > So, if someone could help me, welcome.
> >
> > Thnak you
> >
> > Jean-Charles
> >
> > [To remove yourself from this list, or to change to digest mode, go to
> > http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
> > email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
> > Lingo-L is for learning and helping with programming Lingo.  Thanks!]
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
> email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo.  Thanks!]
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
> email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo.  Thanks!]


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to