设置摄像头目标
-
预备知识
介绍
每个摄像头都有它看向的目标位置。这个位置是看不见的,但是你可以通过提供新目标位置的x/y/z坐标来改变它。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/fdc6d3fa-24b9-4766-bef5-8ba1ec9231c8.png" width="400" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">
演示
在这个程序中,我们首先添加三个分别坐落在X位置=150,0和150的盒子。过后我们添加一个新的轨道摄像头。默认情况下,摄像头将会看向原点(x=0)。
当我们把摄像头的目标位置改编成 x=-150时,它会移向左边,看向在左边的青色盒子。同样的,当目标x是150时,摄像头会看向在右边的粉色盒子。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/5421bc92-671f-4e9a-bc5b-21abd813e3f9.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">
动手时刻:https://play.creaticode.com/projects/4b0759677c498e7a48f581c5
了解更多
-
I CreatiCode pinned this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login