Page 1 of 1

Model Rotation

Posted: Sun Jul 13, 2008 19:56
by Slasher123
Does the MODELDEF flag "ROTATING" take an argument that defines how fast it rotates? If not, I'll make a formal feature suggestion.

EDIT: Never mind, this seems to have already been suggested and closed, but it doesn't specify whether it was implemented or not...

Posted: Sun Jul 13, 2008 20:28
by Enjay
Torr Samaho wrote:I added zoffset support to MODELDEF some time ago, it's definitely in GZDoom 1.0.29. Just add a "zoffset float" line to your MODELDEF.

And I just finished a first implementation of the customizable rotation:

Code: Select all

- Made the model rotation customizable:
	rotation-speed  float: Specify the speed of the rotation
	rotation-vector float float float: Specify the x, y and z component of the vector of the rotation
	rotation-center float float float: Specify the x, y and z coordinate of the center of the rotation
	(Defining rotation initializes the speed to 1, the vector to (0,1,0) and the center to (0,0,0))
With this, you should be able to achieve the rotation you described.
rotation-speed certainly works (-ve numbers reverse the direction) because I've used it quite a bit. I can't remember if I have actually tried the other things but if one works, it's a fair bet the rest have at least been implemented and probably work too.

Posted: Sun Jul 13, 2008 20:32
by Slasher123
Oh ok, good. So this does exist.

But it's not on the Wiki. Someone should put it here.

Posted: Sun Jul 13, 2008 20:37
by Enjay
:shock: I didn't even think GZdoom articles were on the Wiki.

If you think "someone" should do it, why not do it yourself? That's the point of the Wiki. Just register for an account (easy) if you haven't already done so and dive in. ;)

Posted: Sun Jul 13, 2008 20:51
by Slasher123
Enjay wrote:If you think "someone" should do it, why not do it yourself? That's the point of the Wiki. Just register for an account (easy) if you haven't already done so and dive in. ;)
Because I don't know the information. If I did, I wouldn't have needed to ask. And in that situation, I would have been better suited to provide information on the wiki that I felt was missing. As it is, I don't feel qualified to go altering the wiki page on this subject.


On another note, the rotating model now appears to be skipping. The best way to explain it is by watching the demo I recorded.

Posted: Sun Jul 13, 2008 21:06
by Enjay
I only meant that now that you know the information you could do it. :)

Anyway, I do see that skipping. I can't say I've noticed it on mine, but that doesn't mean it hasn't happened (on my models it will be less obvious because there are other things going on too (changes of shape and skin). I'll have to check.

Interestingly, I notice that all your planets skip at the same time, despite them having different speeds and even directions.

Posted: Sun Jul 13, 2008 21:11
by Slasher123
Interesting. It doesn't appear to skip when Rotation-Speed is not specified. And by that I mean, when I comment it out on all of the models, there's no skipping, from what I can tell.

Posted: Sun Jul 13, 2008 21:31
by Enjay
Yes, my rotating models without rotation-speed definitely do not skip. I would have noticed that by now for sure.

Posted: Sun Jul 13, 2008 21:40
by Slasher123
So it's definitely something to do with Rotation-Speed...

I wonder if there's anything significant about the angle they skip to, the amount of time in between skips, or anything like that. I have no idea.

Posted: Sun Jul 13, 2008 22:05
by Enjay
The best thing to do would be to rasie a bug report with your example file attached. Graf or Torr should be able to figure out what's going on.

Posted: Sun Jul 13, 2008 22:12
by Slasher123
Done. Only a matter of time now.