Page 1 of 1

### Spawning a box with a specific angle?

Posted: Sat Dec 19, 2009 7:45 pm
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:
Filesize: 12.3 kB
Ratings: 1

### Re: Spawning a box with a specific angle?

Posted: Sat Dec 19, 2009 8:35 pm
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?

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

### Re: Spawning a box with a specific angle?

Posted: Sat Dec 19, 2009 8:41 pm
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?

Posted: Sat Dec 19, 2009 8:47 pm
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?

Posted: Sun Dec 20, 2009 3:27 am
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?

Posted: Sun Dec 20, 2009 12:19 pm
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?

Posted: Sun Dec 20, 2009 12:23 pm
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?

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

### Re: Spawning a box with a specific angle?

Posted: Sun Dec 20, 2009 12:47 pm
angle := scene.my.ang

### Re: Spawning a box with a specific angle?

Posted: Sun Dec 20, 2009 4:03 pm
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.