turn object upside down [message #466439] |
Sat, 21 April 2012 06:32 |
robbyke
Messages: 348 Registered: September 2010 Location: Belgium
Karma: 0
|
Recruit |
|
|
is there away to set X/Y rotations of a created object?
i saw it wasnt possible in level edit so i doubt it will be trough scripting
Owner of kambot TT server
kambot.freeforums.org
|
|
|
|
|
|
|
|
|
|
|
Re: turn object upside down [message #466509 is a reply to message #466439] |
Mon, 23 April 2012 01:24 |
|
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
Here's the commands I made to test this.
else if (Command == "!rotatex") {
GameObject *obj = Get_Vehicle(Get_GameObj(ID));
if (obj) {
Matrix3D Transform = Get_Transform(obj);
Transform.Rotate_X(DEG_TO_RADF(Msg.As_Int(2)));
Set_Transform(obj,Transform);
}
}
else if (Command == "!rotatey") {
GameObject *obj = Get_Vehicle(Get_GameObj(ID));
if (obj) {
Matrix3D Transform = Get_Transform(obj);
Transform.Rotate_Y(DEG_TO_RADF(Msg.As_Int(2)));
Set_Transform(obj,Transform);
}
}
else if (Command == "!rotatez") {
GameObject *obj = Get_Vehicle(Get_GameObj(ID));
if (obj) {
Matrix3D Transform = Get_Transform(obj);
Transform.Rotate_Z(DEG_TO_RADF(Msg.As_Int(2)));
Set_Transform(obj,Transform);
}
}
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|
|
|
|
Re: turn object upside down [message #466549 is a reply to message #466439] |
Mon, 23 April 2012 10:53 |
robbyke
Messages: 348 Registered: September 2010 Location: Belgium
Karma: 0
|
Recruit |
|
|
it would open up many possibilties if implemented in new scripts but i doubt tt crew has time ^^
Owner of kambot TT server
kambot.freeforums.org
|
|
|
Re: turn object upside down [message #466553 is a reply to message #466439] |
Mon, 23 April 2012 12:45 |
|
E!
Messages: 70 Registered: February 2004
Karma: 0
|
Recruit |
|
|
btw: rotating objects around X/Y axis IS possible in LE.
simply hold right mouse button and move the mouse.
<<SCUD-Storm Origin Creator>>
|
|
|
Re: turn object upside down [message #466556 is a reply to message #466519] |
Mon, 23 April 2012 13:18 |
|
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
iRANian wrote on Mon, 23 April 2012 05:05 | Does it work on players?
|
No. While all physics classes have a transform only vehicles seem to send it over the network/render it correctly.
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|
Re: turn object upside down [message #466576 is a reply to message #466556] |
Mon, 23 April 2012 22:18 |
robbyke
Messages: 348 Registered: September 2010 Location: Belgium
Karma: 0
|
Recruit |
|
|
Whitedragon wrote on Mon, 23 April 2012 22:18 |
iRANian wrote on Mon, 23 April 2012 05:05 | Does it work on players?
|
No. While all physics classes have a transform only vehicles seem to send it over the network/render it correctly.
|
maybe because vehs are the only ones that go with the terrain.
it would be funny if chars would do so to but that wouldnt be realistic
Owner of kambot TT server
kambot.freeforums.org
|
|
|
Re: turn object upside down [message #466641 is a reply to message #466439] |
Wed, 25 April 2012 09:04 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
How would I go about setting the X rotation to -180 degrees? Using Matrix3D::Rotate_X() with 180 degrees will go from 180 to -180 degrees like it's supposed to but I can't figure out what function I should use to set the X rotation to -180 degrees only.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
|
|
|
Re: turn object upside down [message #466653 is a reply to message #466641] |
Wed, 25 April 2012 12:13 |
robbyke
Messages: 348 Registered: September 2010 Location: Belgium
Karma: 0
|
Recruit |
|
|
iRANian wrote on Wed, 25 April 2012 18:04 | How would I go about setting the X rotation to -180 degrees? Using Matrix3D::Rotate_X() with 180 degrees will go from 180 to -180 degrees like it's supposed to but I can't figure out what function I should use to set the X rotation to -180 degrees only.
|
how do you do something that has exactly the same outcome but a only different direction -> -180° = 180° youre working on a circle there
and use DEG_TO_GRADF() in one of my last question was explained that matrix uses grad not degrees
Owner of kambot TT server
kambot.freeforums.org
|
|
|