Gamemodel and rotate?


(Igloo) #1

Hello,

Is it possible to make misc_gamemodel object rotating? If yes, I would like to know how :evil:

Thanks!

Greetings,
Igloo


(RayBan) #2

yes, you need to give the misc_gamemodel a targetname/scriptname ( although it may just need the targetname )
and then in your map script you can use setrotation. for example if you used the goldbox…


classname  misc_gamemodel
model  models/mapobjects/goldbox_sd/goldbox.md3
scriptname  goldbox_test
targetname  goldbox_test

then to rotate it you could do this in the map script,


goldbox_test
{
	spawn
	{
		wait 25
		setrotation 0 125 0
	}
}

the angles should be setrotation PITCH YAW ROLL with 125 being the speed of the rotation


(Igloo) #3

Danke, which key sets the angle? I want it to rotate like ceiling fan… :] OK if by default it does.

Greetings,
Igloo


(PatRevenant) #4

the angles should be setrotation PITCH YAW ROLL with 125 being the speed of the rotation

YAW should be it. If not, just experiment.


(RayBan) #5

its setrotation PITCH YAW ROLL

you have to visualize what each one does, PITCH will be like a rocking chair,
YAW would be like a top, which would allow it to spin along the Y axis, and ROLL
would be lke a rocking chair at right angles to the PITCH… actually…
rocking chairs is a bad analogy… just think that PITCH and ROLL do the
same thing, but rotate at right angles to each other.

EDIT:
just to clarify, for a ceiling fan you would want it to rotate on the YAW, like
in the example i did for the goldbox, for a wall fan it would either be PITCH or ROLL

REDIT:
what PatRevenant said… :slight_smile:


(zig-zag) #6

There’s a ceiling fan in Goldrush at tank spawn. Have a look at how SD did theirs if you’re still unsure.


(murka) #7

thats made of brushes and is a func_rotating entity i guess.