![]() ![]() when the projectile hits something, the server is given a position.give each rocket a timestamp of tick() as well as a custom id, and a marker telling which player shot it.for each projectile, a table is created (well call it projectile data) and stored in a big database (a table called currentprojectiles or something).You can check the time of arrival dupe by creating a timestamp for each projectile. If anyone has any suggestions, I’m open to hearing them. This check doesn’t account for travel time (not that I know if it should, none of our projectiles change directions and homing shots skip this check entirely) so I’m sure there’s definitive room for improvement. ‘o’ is the place the shot originated from, ‘p’ is the position of the shot at the time of contact, and ‘v’ is the direction the shot was originally fired from. What I have as of now though is incredibly barebones - it simply assesses the magnitude between two unit vectors. Thus I’m forced to give the client permissions and simply send the server details regarding the projectile when a hit connects for the server to leaf through and determine whether or not the hit was legal. It’s sloppy, I know - but the projectiles we use are large and definitely too big to be visually accurate to a raycasted hitcheck. The projectiles I use aren’t hitscan - they’re comparitively slow-moving physics-based projectiles that register hits via a clientsided Touched event. I’m currently attempting to program server-based sanity checking regarding projectiles into a class-based fighter I’m making. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |