Page 1 of 1

Spawning a box with a specific angle?

PostPosted: Sat Dec 19, 2009 7:45 pm
by Rideg
Hello! me again and wondering how to spawn a box with the same angle of another box. Can't explain it better so i'm posting a scene that explains my "problem" better;) Thank you all.

Rating: rated 5
Filesize: 12.3 kB
Comments: 2
Ratings: 1
download

Re: Spawning a box with a specific angle?

PostPosted: Sat Dec 19, 2009 8:35 pm
by KarateBrot
It's exactly the same like here ;)

but you can't use "this.angle" that's no variable in algodoo. and instead of typing := type = because := is the declaring sign.

Re: Spawning a box with a specific angle?

PostPosted: Sat Dec 19, 2009 8:38 pm
by Rideg
So I type scene.my.thisAngle=what?

Re: Spawning a box with a specific angle?

PostPosted: Sat Dec 19, 2009 8:41 pm
by KarateBrot
yes exactly.
but what you want to type depends on what you want to do with scene.my.thisangle

Re: Spawning a box with a specific angle?

PostPosted: Sat Dec 19, 2009 8:47 pm
by Rideg
You know the box that spwnes in by the red box? Well the spawned boxes angle should be spawned with the same angle as the grey box, and I don't know what to write in the script :(

Re: Spawning a box with a specific angle?

PostPosted: Sun Dec 20, 2009 3:27 am
by KarateBrot
which angle do you mean? the grey box has got 4 sides so basically there are 4 angles.

Re: Spawning a box with a specific angle?

PostPosted: Sun Dec 20, 2009 12:19 pm
by Rideg
It has the angle of zero degrees ( the side were the laser hits it )currently but when it's being rotated the angle changes and so does the scene.my.thisAngle.

Re: Spawning a box with a specific angle?

PostPosted: Sun Dec 20, 2009 12:23 pm
by KarateBrot
where it hits it that's not 0 degrees. it's 270 degrees. if the laser would hit the right side of the box it would be 0 degrees.

Re: Spawning a box with a specific angle?

PostPosted: Sun Dec 20, 2009 12:35 pm
by Rideg
okey.. but the problem remains how will I get the spawned boxex to have that angle?

Re: Spawning a box with a specific angle?

PostPosted: Sun Dec 20, 2009 12:47 pm
by standardtoaster
angle := scene.my.ang

Re: Spawning a box with a specific angle?

PostPosted: Sun Dec 20, 2009 4:03 pm
by Rideg
yeah know that it's updating the variable thats the problem.. I need the grey box angle to tell the variable what number it should have.