Hey, so like basically everyone else I'm working on a little FPS to get used to the Galaxy Editor, but I'm having some trouble with the targeting system. As it works now, WASD alters a global Real which the character then turns to (this is so a unit that is walking forward will not have to stop to turn). Also, this allows the camera to remain facing forward when the character strafes.
For my weapon system, I spawn a unit and order it to move to a point (position of the character) with polar offset (towards camera facing degrees) so that when strafing you can still fire forward. Collision of bullets is working fine, but the targeting is terrible. Even though the camera/movement works perfectly, the bullets often fly in completely random (or at least as far as I can tell) directions. Sometimes it seems as if they are all attracted to a particular point, but that point changes often.
Anyways I was wondering if anyone had any ideas on what's going wrong and how to fix it. I can put up some of my triggers if that'll make it easier, and any help is appreciated.
Hey, I read your post and this targetting system is something I was trying to do myself. I have an idea that I came up with, but i'm at work and can't implement it. However, i'll give you the logic flow if you let me take a look at your camera work! I'm still trying to get a solid camera together, and i'm more than willing to share my findings with you if I get a really great one working out.
Okay, so my idea is to make a trigger that will constantly be doing an equation and returning a point value based on the result of the pitch & yaw of the camera.
If you look at the map library, there is a map called Perdition featured by Qancakes. In it, he has a projectile firing system that flies in the direction the camera yaw is facing. I believe if we create something that returns a value based on the camera yaw and pitch, and have the fired projectile go towards that point offset by the origin point of the projectile (unit firing it) we can get a bullet to fire in the direction the camera is currently centered in and collide with an object in its path. Once we put a rectile centered in the middle of the screen/camera, we are making fully legit shooters.
Hey, so like basically everyone else I'm working on a little FPS to get used to the Galaxy Editor, but I'm having some trouble with the targeting system. As it works now, WASD alters a global Real which the character then turns to (this is so a unit that is walking forward will not have to stop to turn). Also, this allows the camera to remain facing forward when the character strafes.
For my weapon system, I spawn a unit and order it to move to a point (position of the character) with polar offset (towards camera facing degrees) so that when strafing you can still fire forward. Collision of bullets is working fine, but the targeting is terrible. Even though the camera/movement works perfectly, the bullets often fly in completely random (or at least as far as I can tell) directions. Sometimes it seems as if they are all attracted to a particular point, but that point changes often.
Anyways I was wondering if anyone had any ideas on what's going wrong and how to fix it. I can put up some of my triggers if that'll make it easier, and any help is appreciated.
Thanks!
Hey, I read your post and this targetting system is something I was trying to do myself. I have an idea that I came up with, but i'm at work and can't implement it. However, i'll give you the logic flow if you let me take a look at your camera work! I'm still trying to get a solid camera together, and i'm more than willing to share my findings with you if I get a really great one working out.
Okay, so my idea is to make a trigger that will constantly be doing an equation and returning a point value based on the result of the pitch & yaw of the camera. If you look at the map library, there is a map called Perdition featured by Qancakes. In it, he has a projectile firing system that flies in the direction the camera yaw is facing. I believe if we create something that returns a value based on the camera yaw and pitch, and have the fired projectile go towards that point offset by the origin point of the projectile (unit firing it) we can get a bullet to fire in the direction the camera is currently centered in and collide with an object in its path. Once we put a rectile centered in the middle of the screen/camera, we are making fully legit shooters.
I haven't had any issues doing the same thing... http://www.sc2mapster.com/maps/g-3pshooter/
Could you post your triggers so I can take a look?