3D Rotation Suggestion

New releases and general discussions.

Post » Fri Jul 15, 2011 12:26 am

As someone who likes screwing around with 3D, one thing I think would make construct much more flexible with 3D without making it much more complicated would be an applied rotations system.

It would essentially work like this:

Suppose you had a game with ball (With a star on it) and overhead view. All you have to do is get the ball in the goal, and you win. Sound simple?

One problem, how the heck do you animate the ball? You could do in 3D, but the current rotation system would make this a coding nightmare. Your ball rolling up and down (Pitch) would be fine, but the left and right(Yaw) would get screwed up by the pitch. Doing this in 2d would only add the nightmare of animating the ball as well.

Anyway, an applied rotations system would be a bit different. Instead of changing the the Yaw Pitch and Roll. It adds it on top of everything else.

You could say
Rotate Yaw by 25 degrees
Rotate Pitch by 30 degrees
Rotate Yaw by -10 degrees

Or in the examples case:

Rotate Yaw by 3DBall[8Direction].VectorX
Rotate Pitch by 3DBall[8Direction].VectorY

And it would do the rotations in that order, and do those same rotations every frame. But that leads to an issue where rotations are recalculated every frame, since the math would just stack up on itself. A fourth command is necessary.

Reset Rotations

Done every frame proceeding actual rotations, and you essentially have the old system, with a huge degree (Of being able to decide rotation order) of control added. This would certainly make giving life to 3D elements in a game a bit easier and allow for more complicated designs. Sorry if I stretched this out a bit

B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Fri Jul 15, 2011 3:12 am

Do pitch / roll/ yaw reset after 360?
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Fri Jul 15, 2011 5:21 am

Actually no. The original system doesn't (At least with 3d box), and the one I'm suggesting wouldn't work with a simple "Reset after 360" since a rotation on Yaw at one point could be completely different at another.
B
51
S
10
G
7
Posts: 184
Reputation: 6,825


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest