See the video below for a brief synopsis of the problem:
I'm trying to create a SC2 themed TPS space combat simulator and am in the early phases of doing so. I've hit a roadblock early though, as I can't even seem to get my camera to act properly. As you can see in the video above, the camera rotates fine around the target, except at very specific angles when setting the camera near the horizon (180 degrees and 000 degrees). The camera also seems to have a tendency to "clip" to the Battlecruiser if there's a wing or flap in the way, although it's minor.
I get the impression that the camera is subject to some sort of clipping with respect to both the unit it follows as well as the terrain "base" itself. I'm wondering how I can go about fixing this. I've seen other TPS not have this issue so clearly I'm doing something wrong. The few maps that I've been able to analyze that have the mechanics I'm looking for haven't really given me a clue as to where I should be looking.
I have already trying to modify essentially every parameter under "Cameras" in data (I created a custom camera and applied it via the "Set Camera Data" trigger but none of the parameters seem to fix this particular issue. Any ideas?
As a side question - does anyone know the simplest way to implement a 3D weapons system into the game (preferably through data, although I'm going to assume it's going to involve complex arrays and a lot of variables in triggers...). AKA weapons that track the range of a target not only in the x, y coordinate system but also take into account the relative height of the target to you? (imagine a range SPHERE instead of a circle)
Alright so I fixed the first issue without too much trouble; all I did was increase the base height of every unit in my game by several units. This prevents the camera from clipping to the floor of the map when rotating above/below the target.
The only issue I have now (and it's not really half as bad, but still a minor annoyance) is the clipping with the Battlecruiser itself. If I rotate it and look around it's wings, it seems to clip in/out a little bit to adjust with the model itself. I don't see anything in Camera data that could fix this, and nothing in the Model data's fields seems to indicate an interaction with the camera itself.
As for triggers, my camera couldn't be simpler. It's just "Camera - Turn camera mouse rotation on for player _". That's it. The only other thing set up for my camera is which camera in data is the default camera (of which none fix this issue anyway).
I'd just like to update that I've found the cause of this issue. I was not looking in the right place. Thanks to this Thread I was able to figure out that the camera, when set to "Mouse Rotation" via triggers, actually interacts with the UI of all things! This causes you to get these weird clipping issues at particular angles relative to your screen (I thought it was relative to each model).
Now, the only problem I have is that I want to retain my UI while not having this issue. Any ideas?
That sounds like an interesting idea. I haven't really dabbled much with the UI portion of the editor yet though, so I'm not really sure where to get these UI's as models so I can attach them (using triggers presumably). I can't really find much in Data that pertains to the UI we see on the screen, and the UI Editor doesn't seem to do anything interesting with them (other than show what they look like...).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
See the video below for a brief synopsis of the problem:
I'm trying to create a SC2 themed TPS space combat simulator and am in the early phases of doing so. I've hit a roadblock early though, as I can't even seem to get my camera to act properly. As you can see in the video above, the camera rotates fine around the target, except at very specific angles when setting the camera near the horizon (180 degrees and 000 degrees). The camera also seems to have a tendency to "clip" to the Battlecruiser if there's a wing or flap in the way, although it's minor.
I get the impression that the camera is subject to some sort of clipping with respect to both the unit it follows as well as the terrain "base" itself. I'm wondering how I can go about fixing this. I've seen other TPS not have this issue so clearly I'm doing something wrong. The few maps that I've been able to analyze that have the mechanics I'm looking for haven't really given me a clue as to where I should be looking.
I have already trying to modify essentially every parameter under "Cameras" in data (I created a custom camera and applied it via the "Set Camera Data" trigger but none of the parameters seem to fix this particular issue. Any ideas?
As a side question - does anyone know the simplest way to implement a 3D weapons system into the game (preferably through data, although I'm going to assume it's going to involve complex arrays and a lot of variables in triggers...). AKA weapons that track the range of a target not only in the x, y coordinate system but also take into account the relative height of the target to you? (imagine a range SPHERE instead of a circle)
There was a starship troopers map back in the old days which did that even had wall climbing.
The jerky camera could be your triggers.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Alright so I fixed the first issue without too much trouble; all I did was increase the base height of every unit in my game by several units. This prevents the camera from clipping to the floor of the map when rotating above/below the target.
The only issue I have now (and it's not really half as bad, but still a minor annoyance) is the clipping with the Battlecruiser itself. If I rotate it and look around it's wings, it seems to clip in/out a little bit to adjust with the model itself. I don't see anything in Camera data that could fix this, and nothing in the Model data's fields seems to indicate an interaction with the camera itself.
As for triggers, my camera couldn't be simpler. It's just "Camera - Turn camera mouse rotation on for player _". That's it. The only other thing set up for my camera is which camera in data is the default camera (of which none fix this issue anyway).
I'd just like to update that I've found the cause of this issue. I was not looking in the right place. Thanks to this Thread I was able to figure out that the camera, when set to "Mouse Rotation" via triggers, actually interacts with the UI of all things! This causes you to get these weird clipping issues at particular angles relative to your screen (I thought it was relative to each model).
Now, the only problem I have is that I want to retain my UI while not having this issue. Any ideas?
Attach your UI as models onto the camera and scale them? Bit like the spear or adun does in the LOTV campaign.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
That sounds like an interesting idea. I haven't really dabbled much with the UI portion of the editor yet though, so I'm not really sure where to get these UI's as models so I can attach them (using triggers presumably). I can't really find much in Data that pertains to the UI we see on the screen, and the UI Editor doesn't seem to do anything interesting with them (other than show what they look like...).