AS3 - 检测在哪里发生了碰撞并旋转一切物体的90度碰撞后点 [英] AS3 - Detect WHERE a collision occurred and ROTATE everything AFTER the collision point of the object by 90 degrees

查看:170
本文介绍了AS3 - 检测在哪里发生了碰撞并旋转一切物体的90度碰撞后点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


免责声明
下面的解释可能是没有意义的,所以来看看 http://raphaelhennessy.com/misc/Explanation。 png格式了解详情
从本质上讲,我在做一个游戏,一个拉泽照射到屏幕上,你有镜子的地方,你可以拖动周围的屏幕上。还有一个地球某处在屏幕上。该游戏的目的是将光导向,利用反射镜,入地球。那么,全球的动画播放充盈着光,你进步到一个新的水平。
时间之后,水平得到一定程度困难和新的障碍和挑战进行了介绍。照片 我的问题是这样的;我得到了拉泽,镜子和放大器;全球所有的舞台上工作正常,但我无法弄清楚如何以编程方式使拉泽'反弹'脱镜。
在此先感谢,
-Raph


DISCLAIMER
The following explanation probably makes no sense, so have a look at http://raphaelhennessy.com/misc/Explanation.png for more information
Essentially, I'm making a game where a lazer shines onto the screen and you have a mirror somewhere on the screen you can drag around. There is also a globe somewhere on the screen. The aim of the game is to direct the light, using the mirror, into the globe. Then, an animation plays of the globe filling with light and you progress to the next level.
After time, the levels get somewhat harder and new obstacles and challenges are introduced.
My problem is this; I got the lazer, mirror & globe all on the stage working fine except that I can't figure out how to programmatically make the lazer 'bounce' off the mirror.
Thanks in advance,
-Raph

推荐答案

我想通了,如何做到这一点。如果你有兴趣,你可以找到code在raphaelhennessy.com/misc/LightStage.zip

I figured out how to do this. If you are interested you can find the code at raphaelhennessy.com/misc/LightStage.zip

这篇关于AS3 - 检测在哪里发生了碰撞并旋转一切物体的90度碰撞后点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆