No rotation on all three axis?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

No rotation on all three axis?

Post by tltrude »

I am having trouble making a stormdoor script_object open on an angle. As you can see in the screenshot, it will move on two axis just fine. But somehow Y and Z seem to be rotating on the same axis after X has been rotated. Here is a test map with the doors and a rotation tester. Any help to get the doors angled down on the Z axis (actually it is up) when open would be great!

http://pages.sbcglobal.net/tltrude/Temp ... tation.zip (replaced, see post below)

Image
Last edited by tltrude on Fri Mar 26, 2004 4:35 pm, edited 3 times in total.
Tom Trude,

Image
Combat Kirby
Lance Corporal
Posts: 18
Joined: Wed Mar 03, 2004 7:50 pm

Post by Combat Kirby »

I will help you with it, Tom. But right now I am at work and no map editor at my disposal. I have been doing lots of brush rotation myself in my map. By the way, Great TUTS on your website! Congrates!

Try using rotateZupto or rotateZdownto to make the angle work, have you tried those?

Regards,
Kirby.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

rotateZupto

Post by tltrude »

"rotateZupto" does not seem to work at all.
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

well when you make a script object it's angles are ( 0 0 0 ) so if you make the doors flat not angled then in script you change it to the angles you need then rotate x is pitch and y is a flat spin or yaw and z is side or roll . So if the doors top to bottom was 0 to 90 when you made it then after you set the angles of it from script you should be able to rotate it on the z axis . I will download your zip and have a go at it .
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

stormdoor2

Post by tltrude »

Stormdoor2 starts flat in the map, so I'll try it too.

Ps: Tried it and "angles" are just like the rotation--roll makes it yaw when the pitch is changed.
Tom Trude,

Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Re: stormdoor2

Post by jv_map »

tltrude wrote:Ps: Tried it and "angles" are just like the rotation--roll makes it yaw when the pitch is changed.
Well in my experiences 'angles' are pretty consistent... i.e. it will always be pitch, yaw, roll in that order :wink:
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

working

Post by tltrude »

Well, I did get it working with bdbodger's support and encouragement. But, it can only be discribed as "The hard way"!

http://pages.sbcglobal.net/tltrude/Temp ... tation.zip

Code: Select all

main:



	level waittill prespawn

	exec global/ambient.scr mohdm1

	$sd1_lt_origin time 2
	$sd1_rt_origin time 2
	$sd1_lt time 2
	$sd1_rt time 2

	$sd1_rt bind $sd1_rt_origin  // bind script_object door brush to script_origin
	$sd1_lt bind $sd1_lt_origin  // bind script_object door brush to script_origin

	thread stormdoor1_mover

	level waittill spawn

end


//------------------------------------------
// storm door 1
//------------------------------------------

stormdoor1_mover:

	$sd1_trigger waittill trigger
	$sd1_speaker playsound door_wood_open_move

	$sd1_lt_origin rotateXup -90 // rotate script_origin
	$sd1_rt_origin rotateXup 90
	$sd1_lt_origin rotateYup -6.5
	$sd1_rt_origin rotateYup 6.5

	$sd1_lt rotateYup -6.5 // rotate script_object door
	$sd1_rt rotateYup 6.5

	$sd1_lt_origin move
	$sd1_rt_origin move
	$sd1_lt move
	$sd1_rt waitmove

	$sd1_speaker playsound door_wood_open_stop

	wait 15

	$sd1_speaker playsound door_wood_close_move

	$sd1_lt_origin rotateXdown -90 // rotate script_origin
	$sd1_rt_origin rotateXdown 90
	$sd1_lt_origin rotateYdown -6.5
	$sd1_rt_origin rotateYdown 6.5

	$sd1_lt rotateYdown -6.5 // rotate script_object door
	$sd1_rt rotateYdown 6.5

	$sd1_lt_origin move
	$sd1_rt_origin move
	$sd1_lt move
	$sd1_rt waitmove

	$sd1_speaker playsound door_wood_close_stop

	goto stormdoor1_mover

end


// Note: door brushes are at 6.5 degrees in the map.

Placing the script_origins on either side of the doors is a pain--and still not perfect. But, the doors do open on an angle now. It appears that rotating, or angling, script_objects on three axis is not possible!
Tom Trude,

Image
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

Thanks for the link Tom, I will go study what you've done now. :)
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Re: working

Post by jv_map »

tltrude wrote:It appears that rotating, or angling, script_objects on three axis is not possible!
Hmmm the flyable chopper I made for the modern warfare mod (which is also a script_object) doesn't have any probs with it :)

I only used the 'angles' command to make it pitch/yaw/roll.
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

We tried that JV and no matter what we did the door would rotate on the x axis ok but if you tried the y or z axis it aways changed the yaw we could not get it to roll properly . It remained level after rotateing on the x axis . Tom's idea was a good one to rotate the door and have a script origin to bind to to roll it . Actually I think Tom rotated it on the x axis with the script origin and then rolled the door .
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

chopper

Post by tltrude »

I bet you can't get your chopper to do a hammerhead stall with a half twist! Did you script it's angles, or is it done with a spline path?
Tom Trude,

Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Well right now the pitch and roll can never exceed 70 degrees positive or negative... I could change that though and see what happens :)

Oh yeah I scripted the angles... little use for splinepaths here (I think you can't even spawn them via script).
Image
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Re: chopper

Post by small_sumo »

tltrude wrote:I bet you can't get your chopper to do a hammerhead stall with a half twist! Did you script it's angles, or is it done with a spline path?
LOL
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
Post Reply