Poll: What one?
You do not have permission to vote in this poll.
OMA
25.93%
7 25.93%
OMA
33.33%
9 33.33%
OMA
18.52%
5 18.52%
OMA
22.22%
6 22.22%
Total 27 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Set angles on models and Rotate them
#1
Hello

Another tutorial, this one I think is usefull, is about rotating a model angle and setting a model angle

Lets put first the model with the one Ill explain this:

Code:
OMA = Spawn("script_model",(0,0,0));
OMA SetModel("weapon_oma_pack");

Now, well set the initial angles like this.

Code:
object.angles = (angles[0],angles[1],angles[2]);

Angle Info:

Lets go in our example:

Code:
OMA.angles = (0,90,0); // this will set the Pitch and Roll in 0 and the Yaw in 90 degrees

To rotate a model we can do it by many ways, this 3 are used to rotate the model in one certain angle(pitch,yaw,roll):

Code:
object RotatePitch(degrees,time in seconds);
object RotateYaw(degrees,time in seconds);
object RotateRoll(degrees,time in seconds);

But I recomend you using this other command, is far completer because it allows you to rotate the object in the 3 ways using a period of time.

Code:
object RotateTo((pitch,yaw,roll),time in seconds);

Lets go into our example and lets rotate the object to the angles (60,30,20) in 5 seconds:

Code:
OMA RotateTo((60,30,20),5);

Thats it, now you know how to modify a object angles perfectly
Reply

#2
OMG PLEASE;

http://www.zeroy.com/script/
Reply

#3
(09-20-2011, 15:31)Rendflex Wrote: OMG PLEASE;

http://www.zeroy.com/script/

Fuu My explanations are better
Reply

#4
(09-20-2011, 15:32)Yamato Wrote:
(09-20-2011, 15:31)Rendflex Wrote: OMG PLEASE;

http://www.zeroy.com/script/

Fuu My explanations are better

As I said :p
[Image: 41a2c.png]
Reply

#5
Can it be attached to player, e.g player walks with spinning OMA above his head ?
[Image: lQDUjba.jpg]
Reply

#6
(09-20-2011, 15:38)OrangePL Wrote: Can it be attached to player, e.g player walks with spinning OMA above his head ?

If it's still a defined script_model, then yes.
Reply

#7
(09-20-2011, 15:38)OrangePL Wrote: Can it be attached to player, e.g player walks with spinning OMA above his head ?

No, but you can make it follow the player head, Big Grin

Code:
while(1)
{
    head = self GetTagOrigin("j_head");
    OMA MoveTo(head,0.08);
    OMA RotateTo((RandomInt(360),RandomInt(360),RandomInt(360)),0.08);
    wait 0.08;
}
Reply

#8
(09-20-2011, 15:42)Yamato Wrote:
(09-20-2011, 15:38)OrangePL Wrote: Can it be attached to player, e.g player walks with spinning OMA above his head ?

No, but you can make it follow the player head, Big Grin

Code:
while(1)
{
    head = self GetTagOrigin("j_head");
    OMA MoveTo(head,0.08);
    OMA RotateTo((RandomInt(360),RandomInt(360),RandomInt(360)),0.08);
    wait 0.08;
}

Why not use linkto?
Reply

#9
(09-20-2011, 15:43)Rendflex Wrote:
(09-20-2011, 15:42)Yamato Wrote:
(09-20-2011, 15:38)OrangePL Wrote: Can it be attached to player, e.g player walks with spinning OMA above his head ?

No, but you can make it follow the player head, Big Grin

Code:
while(1)
{
    head = self GetTagOrigin("j_head");
    OMA MoveTo(head,0.08);
    OMA RotateTo((RandomInt(360),RandomInt(360),RandomInt(360)),0.08);
    wait 0.08;
}

Why not use linkto?

Is it posible to linkto to a player?? With attach function you wont be able to rotate the object
Reply

#10
(09-20-2011, 15:44)Yamato Wrote:
(09-20-2011, 15:43)Rendflex Wrote:
(09-20-2011, 15:42)Yamato Wrote:
(09-20-2011, 15:38)OrangePL Wrote: Can it be attached to player, e.g player walks with spinning OMA above his head ?

No, but you can make it follow the player head, Big Grin

Code:
while(1)
{
    head = self GetTagOrigin("j_head");
    OMA MoveTo(head,0.08);
    OMA RotateTo((RandomInt(360),RandomInt(360),RandomInt(360)),0.08);
    wait 0.08;
}

Why not use linkto?

Is it posible to linkto to a player?? With attach function you wont be able to rotate the object

Oh, it dosen't work, my bad :p

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Spawning Solid Models akillj 5 4,427 09-08-2013, 00:07
Last Post: akillj
  List of models that can be spawned? (Looking for C4 model) akillj 5 4,831 06-27-2013, 13:35
Last Post: Yamato
  [C# xna 4] 3d models or vertices array narkos 5 4,427 06-25-2013, 08:14
Last Post: narkos
  Making a Heli's angles match my angles? akillj 1 2,739 06-16-2013, 15:01
Last Post: Yamato
  [Release] Export models from Call Of Duty : Black Ops JariZ 26 34,253 05-16-2013, 17:20
Last Post: mosayebg
  How to get models working? Erik The Born 2 3,072 04-28-2013, 08:19
Last Post: Erik The Born
  Player models McKinleySPB 1 2,903 04-26-2013, 17:36
Last Post: Nekochan
  [Request] List of all weapon models DidUknowiPwn 3 4,650 04-20-2013, 09:13
Last Post: Dominator56
  Not all models where extracted? Erik The Born 8 4,583 04-20-2013, 08:43
Last Post: Erik The Born
  [Tutorial] Importing models from N64 Games into Maya master131 8 18,119 03-15-2013, 04:00
Last Post: bigbangben

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.