ID:152991
Apr 23 2005, 4:40 am
|
|
Has anyone ever managed to create a sort of 3D object that you can rotate? I mean consider a long stick, any ideas on how one would be able to rotate the stick around 360 degrees?
|
Apr 23 2005, 5:14 am
|
|
I am working on one
|
In response to Calus CoRPS
|
|
Uhm, could you specify more? I don't quite get what you want to do.
|
In response to Crashed
|
|
Imagine a long stick. How can one rotate this stick around? Try holding something long in your hand and turning it round, what you're doing there will be what I'm trying to do.
|
Has anyone ever managed to create a sort of 3D object that you can rotate? I mean consider a long stick, any ideas on how one would be able to rotate the stick around 360 degrees? Well in 2D there is only one way to rotate an object(2 if you consider the positive and negative directions differently) however in 3D you have an infinite number of planes you can rotate about so you first need to define your rotation a bit better :P. Anyway it's done in 3D but first setting up a rotation matrix and then appling that matrix to all the points of the object. How you build the matrix depends on the rotation you are doing. |
Well, I wrote a little program in visual basic that drew some points and then rotated them around an angle you specify.
Learn matrix maths. That'll teach you how to rotate points, then make a stick composed of many points. |
In response to Jp
|
|
If I learn matrix maths, will I be able to implement a matrix into BYOND?
|
In response to DeathAwaitsU
|
|
BYOND doesn't have procedures to handle matrices, you'd have to write your own interfaces. Probably using a /matrix datum.
If you're trying to rotate a 3D object properly, in BYOND, I don't suggest it. Basically, any type of 3D engine is not something BYONDs looking for. If you just want a 32 by 32 pixel stick you can rotate around any angle, you'll just have to make many icon states (1024, to be exact), for each combination of z and y rotation, and then use the turn() procedure to do x rotation. Unless there's a more efficient method and I haven't thought of it. Matrix maths is more along the lines of proper, Quake 3D. It's utterly neccesary for that sort of thing, though, so I suggest you learn it anyway. |
In response to Jp
|
|
If you're trying to rotate a 3D object properly, in BYOND, I don't suggest it. Basically, any type of 3D engine is not something BYONDs looking for. For something like a wireframe world it should be too bad. If you pregenerate all the possible lines that can fit in one tile you can cheaply generate any line you want fast enough to be done in real time. If you just want a 32 by 32 pixel stick you can rotate around any angle, you'll just have to make many icon states (1024, to be exact), for each combination of z and y rotation, and then use the turn() procedure to do x rotation. Well if you want to do it right you should also pregenerate all the mirrored versions for a total of 2048 icon states. That way you don't need to generate any icons on the fly which will make things work out much nicer multiplayer. Matrix maths is more along the lines of proper, Quake 3D. It's utterly neccesary for that sort of thing, though, so I suggest you learn it anyway. Quaternions are also used to represent rotations :). |
In response to Theodis
|
|
you can pester OneFishDown about this too- his RoyalNoneSuch Demo did a good job with isometric rotation of the players and/or the playing field.
|
In response to digitalmouse
|
|
In response to Jiskuha
|
|
No thats not even vaguely what I needed.
|
In response to DeathAwaitsU
|
|
I was replying to what digital mouse said.
~>Jiskuha |
In response to Jiskuha
|
|
how is that a reply to my post? your post had nothing to with OFD or his RNS engine that i spoke of. :P
|
In response to digitalmouse
|
|
digitalmouse wrote:
how is that a reply to my post? your post had nothing to with OFD or his RNS engine that i spoke of. :P Quote "rotation of the players and/or the playing field." ~>Jiskuha |
In response to Jiskuha
|
|
you should read my *whole* post: "isometric rotation of the players and/or the playing field." that demo does not do isometric or 3D-like maps, does it?
|
In response to digitalmouse
|
|
Technically yes, it does rotation and it is all isometric; so he might have mistook what you said for what was in that demo. I knew what you meant, but I can also see where it some might not.
The fact that I have used OFD's TRN program might be the reason why I knew what you meant. Perhaps Jiskuha has not used it. |