PDA

View Full Version : How do I get things to rotate?



a_person
08-04-2004, 04:30 AM
I an object to rotate around continuously as a hologram. Like a poweruip rotates. I looked in a powerup cog but found nothing. So how do I do it?

------------------
~Nightfire Mod (http://www.nightfire.uni.cc)~

gbk
08-04-2004, 06:56 AM
rotate(object, vec_dir);


------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)! (http://shauri.hopto.org/polls.pl)

Edward
08-04-2004, 09:52 AM
Four ways.

1. Rotate(thing,vector);
Very unstable. Use this and make sure you put it in a pulse. If you're thing is turned, and there is some kind of problem, the thing will flip around to (0/0/0).

2. RotatePivot(thing,frame,time);
Works OK, if you don't have your thing turned in some strainge way and not to complex turns.

3. If you have something using move=physics, then you can Add Value angvel and enter a vector there. That does work, only not too well if you're going to attach things to it.

4. SetThingLook(thing,vector);
You can also have this in a pulse and all the time adding a value to it. Don't forget to reset the value once it reaches 360.

/Edward

Ace1
08-04-2004, 11:08 AM
The rotation is in the template information, but it is possible in cog. If your making a level, change the master.tpl. If it's a mod, your templates are going to be in static.jkl.
There are many ways to do it in cog though. I'd say SetThingRovVel(thinger, vector) is your best bet. Make sure move=physics for this, since all it this really does is reset the "angvel=(vectorx/vectory/vectorz)". There are many other ways with cog, but I'd say this this the simplest and wont do anything weird like reset to other vectors.

------------------
I am _ Ace_1 _ , and I approve this message.