Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Euler rotations for a sonic the hedgehog game

Author
Message
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 24th Aug 2009 05:43
(i don't think EZ rotate has this functionality, and i don't wanna get EZ rotate anyways, so don't just post "Get EZ rotate!")

After reading a post about a sonic the hedgehog style game, i now want to try to make one of my own.

Basically, this is what i want to be able to do - position "sonic" perpendicular to the surface he is standing on, and be able to rotate him 360 degrees while perpendicular to that surface.

I figure that the place to start would be getting the top of sonic to point towards the normal of the surface.
So, i'm pretty sure that this would define what i want:


I've worked it out that far... but i've never worked with trigonometry like this before. I know that i'm looking for a trigonometric identity, but i don't know which one! Does anyone have a solution to this problem (or a workaround of some kind)
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 24th Aug 2009 11:28
Use two objects. One, hidden, which is pointed at the ground. The second is your Sonic model which can rotate 360 degrees on the Z axis.

Diggsey
19
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Aug 2009 14:38
Get EZRotate

(It CAN do this!)

David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 24th Aug 2009 14:52 Edited at: 24th Aug 2009 14:53
[Nevermind, ignored the 3D aspect of it]

09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 25th Aug 2009 00:49 Edited at: 25th Aug 2009 00:49
The thing about EZ rotate is that I'm more interested in how the solution to this problem works, than just the solution. I'm interested in this to figure out how to solve it in any case. I'm not even planning on making a sonic game, just in figuring this out XD

Anyways, i found that the rotation matrices i was using were wrong (for DBPro rotations). I multiplied my matrix by the vector matrix 0,0,1, and then positioned an object there, and that didn't match up with an object rotated with the same angles. what i think i need is a matrix that rotates the object on the z axis, then y' axis (the y axis rotated by z), then x' axis (the x axis rotated by z then y).

I'll try my best to come up with a rotation matrix like that, but in the meantime, does anyone have one lying around
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 25th Aug 2009 21:32
no luck at finding a correct rotation matrix :\

This problem has got me stumped... but i really want to figure it out. This is the first problem i'm doing involving matrices and angle rotation.

Login to post a reply

Server time is: 2025-05-26 06:06:11
Your offset time is: 2025-05-26 06:06:11