Rotate vehicle camera view [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Rotate vehicle camera view [Solved]

Post by Oceans14 »

I'm having trouble changing the direction that the camera is facing for the LAAT passenger slot. Right now it is facing out the troop bay, and I need it to be facing towards the front of the gunship from the rear of the troop bay. I read Darth D.U.C.K's tut on turrets and cameras and such, but after playing around with EyePointOffset, MountPos, TrackCenter and Trackoffset, I succeeded in confusing myself. It seems like they only translate the camera, not rotate it. Additionally, I'm getting confused by the three numbers that follow each of the above odf values. I know they're x, y, z, and I know y is up/down, but are x and z relative to the vehicle or the world? It should be easy to tell, I know, but somehow it isn't, even with following Marth's advice about picturing everything as a top down grid.

I also tried using TurretNode because I figured that would make the camera match the position and rotation of the selected hardpoint, which I set in xsi. This didn't change anything.

http://www.gametoast.com/viewtopic.php?f=27&t=26985
Hidden/Spoiler:
Also, how do I make a hyperlink just be text? For example "Darth Duck's tut" would be the link to darth duck's tut.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Rotate vehicle camera view

Post by Marth8880 »

In regards to your question about hyperlinks, you use the [url] bbcode, like so:

[url=http://www.aaron-gilbert.com/]Marth's stupid crappy portfolio[/url]


You can format the text between the [url] tags however you like, as long as the format tags are contained within the [url] tags:

[url=http://www.bing.com/][color=#FF00FF][b]Discount Google[/b][/color][/url]


Also, you can use the same method to make images that act as hyperlinks when clicked on:

[url=http://www.gametoast.com/][img]http://www.gametoast.com/styles/StarWar ... e_logo.gif[/img][/url]
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Re: Rotate vehicle camera view

Post by Oceans14 »

Ahh, Gametoast test, so it's just nesting the text in there. Neat, thanks Marth!

As for the rotation, I figured it out. I'm going to explain what I did so that anyone with the same problem in the future will be able to get it working.

1) I did not carefully read Darth D.U.C.K's tutorial. Had I done so, I would've seen this -
The turrets and cameras horizontal rotation is controlled through the line:

Code: Select all

YawLimits   = " smallvalue bigvalue"
That pretty much solves it. However...
2) Obviously the yaw direction is relative to the flyer/vehicle, since the values are within said vehicle's odf. In my case, I set YawLimits to -10 50, which faces forward and allows for more rotation to the right than the left (50 degrees vs 10). The important thing is that 0 (straight ahead) is between these values. I was under the impression that the camera was locked to a degree by some other odf line, and yawlimits just specified how much freedom in either direction it had.
3) Since these values are vehicle-relative, the x-axis is side to side and z is front/back, as one would expect.

None of this is exactly a revelation, but for someone as confused as I was this morning, it could help to clarify.
Post Reply