游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1040|回复: 0

2D lines Angle question !!!

[复制链接]

1

主题

4

帖子

8

积分

新手上路

Rank: 1

积分
8
QQ
发表于 2008-1-20 16:10:00 | 显示全部楼层 |阅读模式


How to let the red lines of X axle be rotated to ZY axle

   Dim AngleTx As Single, AngleTy As Single, AngleTz As Single
        AngleTx = -TestMesh.GetRotation.x / 180 * gcPI
        AngleTy = -TestMesh.GetRotation.y / 180 * gcPI
        AngleTz = TestMesh.GetRotation.z / 180 * gcPI
        
        Dim xX As Single, xY As Single, frontX As D9_3DVECTOR, frontXr As D9_3DVECTOR
'Rotate Y axle
        frontX = Vector3(MeshCenter.x + sngLEN * Cos(AngleTy), MeshCenter.y, MeshCenter.z + sngLEN * Sin(AngleTy))
'Rotate Z axle
        frontXr = Vector3(MeshCenter.x + sngLEN * Cos(AngleTz), MeshCenter.y + sngLEN * Sin(AngleTz), MeshCenter.z)

        dMath.Project3DPointTo2D frontX, xX, xY, False

How does YZ rotation add together?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-12-19 21:54

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表